diff options
author | Li Zefan <lizf@cn.fujitsu.com> | 2008-04-29 04:00:13 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-29 11:06:10 -0400 |
commit | e8d55fdeb882cfcb5e8db5a5ce16edfba78aafc5 (patch) | |
tree | 0c0a7338d8adb2aaf4310eb89d1679c802ea617d /Documentation | |
parent | 472b1053f3c319cc60bfb2a0bb062fed77a93eb6 (diff) |
cgroups: simplify init_subsys()
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: Li Zefan <lizf@cn.fujitsu.com>
Reviewed-by: Paul 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: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'Documentation')
-rw-r--r-- | Documentation/cgroups.txt | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/Documentation/cgroups.txt b/Documentation/cgroups.txt index 31d12e21ff8a..c298a6690e0d 100644 --- a/Documentation/cgroups.txt +++ b/Documentation/cgroups.txt | |||
@@ -500,8 +500,7 @@ post-attachment activity that requires memory allocations or blocking. | |||
500 | 500 | ||
501 | void fork(struct cgroup_subsy *ss, struct task_struct *task) | 501 | void fork(struct cgroup_subsy *ss, struct task_struct *task) |
502 | 502 | ||
503 | Called when a task is forked into a cgroup. Also called during | 503 | Called when a task is forked into a cgroup. |
504 | registration for all existing tasks. | ||
505 | 504 | ||
506 | void exit(struct cgroup_subsys *ss, struct task_struct *task) | 505 | void exit(struct cgroup_subsys *ss, struct task_struct *task) |
507 | 506 | ||