提交 8947f9d5 编写于 作者: L Li Zefan 提交者: Linus Torvalds

cgroups: annotate 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.
Signed-off-by: NLi Zefan <lizf@cn.fujitsu.com>
Acked-by: NPaul Menage <menage@google.com>
Acked-by: NKOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 71cbb949
...@@ -118,7 +118,7 @@ static int root_count; ...@@ -118,7 +118,7 @@ static int root_count;
* extra work in the fork/exit path if none of the subsystems need to * extra work in the fork/exit path if none of the subsystems need to
* be called. * be called.
*/ */
static int need_forkexit_callback; static int need_forkexit_callback __read_mostly;
static int need_mm_owner_callback __read_mostly; static int need_mm_owner_callback __read_mostly;
/* convenient tests for these bits */ /* convenient tests for these bits */
...@@ -220,7 +220,7 @@ static struct hlist_head *css_set_hash(struct cgroup_subsys_state *css[]) ...@@ -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 * task until after the first call to cgroup_iter_start(). This
* reduces the fork()/exit() overhead for people who have cgroups * reduces the fork()/exit() overhead for people who have cgroups
* compiled into their kernel but not actually in use */ * 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 /* When we create or destroy a css_set, the operation simply
* takes/releases a reference count on all the cgroups referenced * takes/releases a reference count on all the cgroups referenced
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册