• David Rientjes's avatar
    cpusets: prevent PF_THREAD_BOUND tasks from attaching to non-root cpusets · 6d7b2f5f
    David Rientjes authored
    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: default avatarDavid Rientjes <rientjes@google.com>
    Cc: Ingo Molnar <mingo@elte.hu>
    Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
    Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    6d7b2f5f
cpuset.c 73 KB