]> git.baikalelectronics.ru Git - kernel.git/commit
cgroup: disallow disabled controllers on the default hierarchy
authorLi Zefan <lizefan@huawei.com>
Thu, 5 Jun 2014 09:16:30 +0000 (17:16 +0800)
committerTejun Heo <tj@kernel.org>
Thu, 5 Jun 2014 13:52:51 +0000 (09:52 -0400)
commit57dda5819a47d3631bb5c01bac2b8492cc303762
tree4887aaada0e6f6328449bc41d4b4e2b911c29df2
parentc4f0c454b2744dafaa6731dff1b17197f5f9812c
cgroup: disallow disabled controllers on the default hierarchy

After booting with cgroup_disable=memory, I still saw memcg files
in the default hierarchy, and I can write to them, though it won't
take effect.

  # dmesg
  ...
  Disabling memory control group subsystem
  ...
  # mount -t cgroup -o __DEVEL__sane_behavior xxx /cgroup
  # ls /cgroup
  ...
  memory.failcnt                   memory.move_charge_at_immigrate
  memory.force_empty               memory.numa_stat
  memory.limit_in_bytes            memory.oom_control
  ...
  # cat /cgroup/memory.usage_in_bytes
  0

tj: Minor comment update.

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