lkml.org 
[lkml]   [2013]   [Nov]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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.


\
 
 \ /
  Last update: 2013-11-28 16:01    [W:0.532 / U:0.376 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site