Skip to content
  • Li Zefan's avatar
    cgroups: simplify init_subsys() · e8d55fde
    Li Zefan authored
    
    
    We are at system boot and there is only 1 cgroup group (i,e, init_css_set), so
    we don't need to run through the css_set linked list.  Neither do we need to
    run through the task list, since no processes have been created yet.
    
    Also referring to a comment in cgroup.h:
    
    struct css_set
    {
    	...
    	/*
    	 * Set of subsystem states, one for each subsystem. This array
    	 * is immutable after creation apart from the init_css_set
    	 * during subsystem registration (at boot time).
    	 */
    	struct cgroup_subsys_state *subsys[CGROUP_SUBSYS_COUNT];
    }
    
    Signed-off-by: default avatarLi Zefan <lizf@cn.fujitsu.com>
    Reviewed-by: default avatarPaul Menage <menage@google.com>
    Cc: Balbir Singh <balbir@linux.vnet.ibm.com>
    Cc: Pavel Emelyanov <xemul@openvz.org>
    Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
    Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    e8d55fde