cgroup: anotate two variables with __read_mostly
PATCH 1/1 cgroup: anotate two variables with __read_mostly
- need_forkexit_callback will be read only after system boot.
- use_task_css_set_links will be read only after it's set.
And these 2 variables are checked when a new process is forked.
--- kernel/cgroup.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
kernel/cgroup.c +2 -2
@@ -118,7 +118,7 @@ static int root_count;* extra work in the fork/exit path if none of the subsystems need to * be called. */ -static int need_forkexit_callback; +static int need_forkexit_callback__read_mostly ;static int need_mm_owner_callback__read_mostly ;/* convenient tests for these bits */
@@ -220,7 +220,7 @@ static struct hlist_head *css_set_hash(struct cgroup_subsys_state *css[])* task until after the first call to cgroup_iter_start(). This * reduces the fork()/exit() overhead for people who have cgroups * compiled into their kernel but not actually in use */ -static int use_task_css_set_links; +static int use_task_css_set_links__read_mostly ;/* When we create or destroy a css_set, the operation simply * takes/releases a reference count on all the cgroups referenced
Signature · 1 line
1.5.4.rc3
A message that is not in the archive (sent off-list or not yet received): [email protected]
Paul Menage
Acked-byQuoted 7 lines · Li Zefan
-
need_forkexit_callbackwill be read only after system boot.
-use_task_css_set_linkswill be read only after it's set.And these 2 variables are checked when a new process is forked.
Signed-off-by Li Zefan <[email protected]>
Thanks.
Paul
Quoted 29 lines
--- kernel/cgroup.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)kernel/cgroup.c +2
-3@@ -118,7 +118,7 @@ static int root_count;* extra work in the fork/exit path if none of the subsystems need to * be called. */ -static int need_forkexit_callback; +static int need_forkexit_callback__read_mostly ;static int need_mm_owner_callback__read_mostly ;/* convenient tests for these bits */ @@ -220,7 +220,7 @@ static struct hlist_head *css_set_hash(struct cgroup_subsys_state *css[])* task until after the first call to cgroup_iter_start(). This * reduces the fork()/exit() overhead for people who have cgroups * compiled into their kernel but not actually in use */ -static int use_task_css_set_links; +static int use_task_css_set_links__read_mostly ;/* When we create or destroy a css_set, the operation simply * takes/releases a reference count on all the cgroups referenced -- 1.5.4.rc3
KOSAKI Motohiro
Acked-byQuoted 7 lines
-
need_forkexit_callbackwill be read only after system boot.
-use_task_css_set_linkswill be read only after it's set.And these 2 variables are checked when a new process is forked.
Signed-off-by Li Zefan <[email protected]>
nice :)
Quoted 7 lines · Li Zefan
-
need_forkexit_callbackwill be read only after system boot.
-use_task_css_set_linkswill be read only after it's set.And these 2 variables are checked when a new process is forked.
Signed-off-by Li Zefan <[email protected]>
Thanks.
Paul
Quoted 29 lines
--- kernel/cgroup.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)kernel/cgroup.c +2
-3@@ -118,7 +118,7 @@ static int root_count;* extra work in the fork/exit path if none of the subsystems need to * be called. */ -static int need_forkexit_callback; +static int need_forkexit_callback__read_mostly ;static int need_mm_owner_callback__read_mostly ;/* convenient tests for these bits */ @@ -220,7 +220,7 @@ static struct hlist_head *css_set_hash(struct cgroup_subsys_state *css[])* task until after the first call to cgroup_iter_start(). This * reduces the fork()/exit() overhead for people who have cgroups * compiled into their kernel but not actually in use */ -static int use_task_css_set_links; +static int use_task_css_set_links__read_mostly ;/* When we create or destroy a css_set, the operation simply * takes/releases a reference count on all the cgroups referenced -- 1.5.4.rc3
Quoted 7 lines
-
need_forkexit_callbackwill be read only after system boot.
-use_task_css_set_linkswill be read only after it's set.And these 2 variables are checked when a new process is forked.
Signed-off-by Li Zefan <[email protected]>
nice :)