cpuset: initialize top_cpuset's configured masks at mount
authorLi Zefan <lizefan@huawei.com>
Wed, 9 Jul 2014 08:48:01 +0000 (16:48 +0800)
committerTejun Heo <tj@kernel.org>
Wed, 9 Jul 2014 19:56:17 +0000 (15:56 -0400)
commit39bd0d15eca5af15ee1492964f317ecdb024a9d6
tree243ed22f95b40f48faa3e14c7fe9bcaf69e3e8ff
parent8b5f1c52dcd1accd3a940cfcb148bef6de589524
cpuset: initialize top_cpuset's configured masks at mount

We now have to support different behaviors for default hierachy and
legacy hiearchy, top_cpuset's configured masks need to be initialized
accordingly.

Suppose we've offlined cpu1.

On default hierarchy:

# mount -t cgroup -o __DEVEL__sane_behavior xxx /cpuset
# cat /cpuset/cpuset.cpus
0-15

On legacy hierarchy:

# mount -t cgroup xxx /cpuset
# cat /cpuset/cpuset.cpus
0,2-15

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