cgroup: separate out taskset operations from cgroup_migrate()
authorTejun Heo <tj@kernel.org>
Fri, 11 Sep 2015 19:00:21 +0000 (15:00 -0400)
committerTejun Heo <tj@kernel.org>
Tue, 22 Sep 2015 16:46:53 +0000 (12:46 -0400)
commitadaae5dcf8920375a2fdc6268f762a0b7b331c55
treea09f5065616798908cb15822081d7fe79d2fc50f
parent9af2ec45c2d323d5ce35b431bb150c0eb567f19a
cgroup: separate out taskset operations from cgroup_migrate()

Currently, cgroup_migreate() implements large part of the migration
logic inline including building the target taskset and actually
migrating them.  This patch separates out the following taskset
operations.

 CGROUP_TASKSET_INIT() : taskset initializer
 cgroup_taskset_add() : add a task to a taskset
 cgroup_taskset_migrate() : migrate a taskset to the destination cgroup

This will be used to implement atomic multi-process migration in
cgroup_update_dfl_csses().  This is pure reorganization which doesn't
introduce any functional changes.

Signed-off-by: Tejun Heo <tj@kernel.org>
Acked-by: Zefan Li <lizefan@huawei.com>
kernel/cgroup.c