• Li Zefan's avatar
    cpuset: rewrite update_tasks_nodemask() · 3b6766fe
    Li Zefan authored
    This patch uses cgroup_scan_tasks() to rebind tasks' vmas to new cpuset's
    mems_allowed.
    
    Not only simplify the code largely, but also avoid allocating an array to
    hold mm pointers of all the tasks in the cpuset.  This array can be big
    (size > PAGESIZE) if we have lots of tasks in that cpuset, thus has a
    chance to fail the allocation when under memory stress.
    Signed-off-by: default avatarLi Zefan <lizf@cn.fujitsu.com>
    Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
    Cc: Paul Menage <menage@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>
    3b6766fe
cpuset.c 72.6 KB