• Li Zefan's avatar
    cgroup: disallow disabled controllers on the default hierarchy · c731ae1d
    Li Zefan authored
    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: default avatarLi Zefan <lizefan@huawei.com>
    Signed-off-by: default avatarTejun Heo <tj@kernel.org>
    c731ae1d
cgroup.c 144 KB