diff options
author | Tejun Heo <tj@kernel.org> | 2011-12-12 18:12:21 -0800 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2011-12-12 18:12:21 -0800 |
commit | 134d33737f9015761c3832f6b268fae6274aac7f (patch) | |
tree | 536b973af6429c25e1fc8ccbaf76395c09a8623d /kernel/cpuset.c | |
parent | cd3d095275374220921fcf0d4e0c16584b26ddbc (diff) | |
download | talos-obmc-linux-134d33737f9015761c3832f6b268fae6274aac7f.tar.gz talos-obmc-linux-134d33737f9015761c3832f6b268fae6274aac7f.zip |
cgroup: improve old cgroup handling in cgroup_attach_proc()
cgroup_attach_proc() behaves differently from cgroup_attach_task() in
the following aspects.
* All hooks are invoked even if no task is actually being moved.
* ->can_attach_task() is called for all tasks in the group whether the
new cgrp is different from the current cgrp or not; however,
->attach_task() is skipped if new equals new. This makes the calls
asymmetric.
This patch improves old cgroup handling in cgroup_attach_proc() by
looking up the current cgroup at the head, recording it in the flex
array along with the task itself, and using it to remove the above two
differences. This will also ease further changes.
-v2: nr_todo renamed to nr_migrating_tasks as per Paul Menage's
suggestion.
Signed-off-by: Tejun Heo <tj@kernel.org>
Reviewed-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Reviewed-by: Frederic Weisbecker <fweisbec@gmail.com>
Acked-by: Paul Menage <paul@paulmenage.org>
Acked-by: Li Zefan <lizf@cn.fujitsu.com>
Diffstat (limited to 'kernel/cpuset.c')
0 files changed, 0 insertions, 0 deletions