Re: [PATCH v4 2/2] lib/vsprintf: Initialize vsprintf's pointer hash once the random core is ready.

From: Petr Mladek
Date: Thu Sep 29 2022 - 04:52:09 EST


On Wed 2022-09-28 11:21:05, Jason A. Donenfeld wrote:
> On 9/28/22, Sebastian Andrzej Siewior <bigeasy@xxxxxxxxxxxxx> wrote:
> >
> >> I could replace "system_unbound_wq" with "system_wq" when
> >> pushing. Is anybody against it, please?
> >
> > so schedule_delayed_work() then?

yup.

> > I don't mind at all. I used that one just because serialisation is not
> > needed and neither is the CPU important.
>
> Indeed, given that this very much is unbound, I think Sebastian's
> original patch makes most sense.

Yes, the work does not need any specific CPU. The thing is that the
normal system_wq is the preferred one. Any other workqueues should
be used only when there is a particular reason for it.

The unbound_wq should be used only when:

+ the work needs a lot of CPU time.

+ there are waves on related (sleeping) work items that might be
triggered from different CPUs.

In our case, the work is only one and short. The preferred
system_wq is perfectly fine.

Best Regards,
Petr

PS: It is not obvious. Tejun told me this when I converted a kthread
into the workqueue API. Also I spent quite some time understanding
the workqueue code recently.