Re: [PATCH 2/5] kmod: Use system_unbound_wq instead of khelper

From: Frederic Weisbecker
Date: Fri Jul 10 2015 - 09:47:55 EST


On Fri, Jul 10, 2015 at 12:44:06AM +0200, Oleg Nesterov wrote:
> On 07/09, Frederic Weisbecker wrote:
> >
> > We need to launch the usermodehelper kernel threads with the widest
> > affinity and this is why we have khelper for. This workqueue has unbound
> > properties and thus a wide affinity inherited by all its children.
> >
> > Now khelper also has special properties that we aren't much interested
> > in: ordered and singlethread. There is really no need about ordering as
> > all we do is creating kernel threads. This can be done concurrently.
> > And singlethread is a useless limitation as well.
> >
> > The workqueue engine already proposes generic unbound workqueues that
> > don't share these useless properties and handle well parallel jobs.
> >
> > Lets just use them.
> >
> > Suggested-by: Oleg Nesterov <oleg@xxxxxxxxxx>
>
> Well yes, but it seems that you missed another part of my email ;)
>
> If we just change usermodehelper to use system_unbound_wq then we
> probably should keep set_cpus_allowed_ptr() removed by 4/5.
>
> Note that system_unbound_wq has ->no_numa == F, so its worker threads
> are NUMA bound. Perhaps this is not that bad, I do not know. But at
> least this means that 4/5 needs more documentation/justification.

Duh! I really thought it was one thread wide affine.
I didn't see that while testing because my box is not NUMA and so I
saw a global affinity.

Now perhaps it is a good thing in the end. At least in nohz full it
doesn't change anything as we affine that workqueue too. But we must
be sure that a single NUMA node is enough to handle typical loads of
usermodehelper.

If nobody can't tell, I suppose all we can do is stay conservative and
create a global no_numa version of system_unbound_wq...

>
> But as for this particular patch I obviously like it, khelper_wq
> must die imo ;)

Sure :-)
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/