You need to sign in or sign up before continuing.
  • Tejun Heo's avatar
    cgroup: use cgroup_setup_root() to initialize cgroup_dummy_root · 985ed670
    Tejun Heo authored
    
    
    cgroup_dummy_root is used to host controllers which aren't attached to
    any other hierarchy.  The root is minimally set up during kernfs
    bootstrap and didn't go through full hierarchy initialization.  We're
    planning to use cgroup_dummy_root for the default unified hierarchy
    and thus want it to be fully functional.
    
    Replace the special initialization, which was collected into
    cgroup_init() by the previous patch, with an invocation of
    cgroup_setup_root().  This simplifies the init path and makes
    cgroup_dummy_root a full hierarchy with its own kernfs_root and all.
    
    As this puts the dummy hierarchy on the cgroup_roots list, rename
    for_each_active_root() to for_each_root() and update its users to skip
    the dummy root for now.
    
    This patch doesn't cause any userland visible behavior changes at this
    point.
    Signed-off-by: default avatarTejun Heo <tj@kernel.org>
    Acked-by: default avatarLi Zefan <lizefan@huawei.com>
    985ed670
cgroup.c 128 KB