]> git.karo-electronics.de Git - karo-tx-linux.git/commit
cgroup: track migration context in cgroup_mgctx
authorTejun Heo <tj@kernel.org>
Mon, 16 Jan 2017 00:03:41 +0000 (19:03 -0500)
committerTejun Heo <tj@kernel.org>
Mon, 16 Jan 2017 00:03:41 +0000 (19:03 -0500)
commite595cd706982bff0211e6fafe5a108421e747fbc
tree4a8b664ac851fd9b8b4ed409c9d728994e76f797
parentd8ebf5191d7fdf81ba34a7c3d726b99c34918030
cgroup: track migration context in cgroup_mgctx

cgroup migration is performed in four steps - css_set preloading,
addition of target tasks, actual migration, and clean up.  A list
named preloaded_csets is used to track the preloading.  This is a bit
too restricted and the code is already depending on the subtlety that
all source css_sets appear before destination ones.

Let's create struct cgroup_mgctx which keeps track of everything
during migration.  Currently, it has separate preload lists for source
and destination csets and also embeds cgroup_taskset which is used
during the actual migration.  This moves struct cgroup_taskset
definition to cgroup-internal.h.

This patch doesn't cause any functional changes.

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