cpusets: prevent PF_THREAD_BOUND tasks from attaching to non-root cpusets
authorDavid Rientjes <rientjes@google.com>
Thu, 2 Apr 2009 23:57:57 +0000 (16:57 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 3 Apr 2009 02:04:57 +0000 (19:04 -0700)
commit6d7b2f5f9e88902b19f91d0c8a7ef58a5455f1a2
tree4ad594fcef55ad95424e58c39e10a723d1dcbe4f
parentdb7f47cf4805e30decb0841764b21b7c4000f7dc
cpusets: prevent PF_THREAD_BOUND tasks from attaching to non-root cpusets

Kthreads that have the PF_THREAD_BOUND bit set in their flags are bound to a
specific cpu.  Thus, their set of allowed cpus shall not change.

This patch prevents such threads from attaching to non-root cpusets.  They do
not have mempolicies that restrict them to a subset of system nodes and, since
their cpumask may never change, they cannot use any of the features of
cpusets.

The tasks will forever be a member of the root cpuset and will be returned
when listing the tasks attached to that cpuset.

Cc: Paul Menage <menage@google.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Dhaval Giani <dhaval@linux.vnet.ibm.com>
Signed-off-by: David Rientjes <rientjes@google.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
kernel/cpuset.c