Re: [PATCH]: exec: avoid propagating PF_NO_SETAFFINITY intouserspace child

From: Peter Zijlstra
Date: Thu Nov 28 2013 - 08:40:00 EST


On Thu, Nov 28, 2013 at 02:31:52PM +0100, Oleg Nesterov wrote:
> On 11/28, Peter Zijlstra wrote:
> >
> > On Thu, Nov 28, 2013 at 12:45:42PM +0100, Oleg Nesterov wrote:
> > > It has? khelper is a workqueue thread, this flag is set by create_worker().
> > >
> > > And it does kernel_thread() (not kthread_create()) so the child gets this
> > > flag too.
> >
> > Urgh, but that's still completely wrong. khelper is a singlethread
> > workqueue, those should be unbound and therefore should not have this
> > flag set at all.
>
> Well. This is debatable, but I leave this to you and Tejun ;)

How can that be debatable? I don't see a single argument in favour of
doing that; its plain ridiculous.

> > In fact, I know people want to set affinity on khelper
>
> This is not that simple. Note that khelper itself is the rescuer thread,
> it doesn't not process the works. There are other kworker/u* threads which
> run the work queued on khelper_wq. There is a pool of threads.

That's just fucked. WTF does singlethreaded mean then?

A single parent process for all usermode helpers makes so much sense;
not doing it is just weird.
--
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/