• T
    cgroup: implement cgroup_subsys->css_reset() · b4536f0c
    Tejun Heo 提交于
    cgroup is implementing support for subsystem dependency which would
    require a way to enable a subsystem even when it's not directly
    configured through "cgroup.subtree_control".
    
    The previous patches added support for explicitly and implicitly
    enabled subsystems and showing/hiding their interface files.  An
    explicitly enabled subsystem may become implicitly enabled if it's
    turned off through "cgroup.subtree_control" but there are subsystems
    depending on it.  In such cases, the subsystem, as it's turned off
    when seen from userland, shouldn't enforce any resource control.
    Also, the subsystem may be explicitly turned on later again and its
    interface files should be as close to the intial state as possible.
    
    This patch adds cgroup_subsys->css_reset() which is invoked when a css
    is hidden.  The callback should disable resource control and reset the
    state to the vanilla state.
    Signed-off-by: NTejun Heo <tj@kernel.org>
    Acked-by: NLi Zefan <lizefan@huawei.com>
    Acked-by: NJohannes Weiner <hannes@cmpxchg.org>
    b4536f0c
cgroup.c 146.0 KB