Messages in this thread | | | Date | Thu, 28 Nov 2013 15:31:45 +0100 | From | Peter Zijlstra <> | Subject | Re: [PATCH]: exec: avoid propagating PF_NO_SETAFFINITY into userspace child |
| |
On Thu, Nov 28, 2013 at 09:13:29AM -0500, Tejun Heo wrote: > Hello, > > > > > 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. > > As the flag name suggests, it prevents userland from changing affinity > of the worker threads which we need whether the worker is confined to > a cpu, NUMA node, random subset of CPUs or not at all. Please note > that there's no one-to-one mapping between a worker and any given > workqueue. workqueue can't allow userland to set affinity on random > workers. They're shared resources.
But the WQ_UNBOUND thingies should be just that and should thus not have the NO_SETAFFINITY flag set because there is no valid reason to have it set.
Regardless of whether the threads are shared between unbound workqueues or not.
Sure, we absolutely must set it for per-cpu workqueues (and their workers) otherwise we cannot guarantee correctness. Same for per-node if we have that.
But absolutely not for unbound.
| |