All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] cgroup: anotate two variables with __read_mostly
@ 2008-06-05  6:02 Li Zefan
       [not found] ` <48478187.7080204-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org>
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Li Zefan @ 2008-06-05  6:02 UTC (permalink / raw)
  To: Andrew Morton; +Cc: LKML, Linux Containers, Paul Menage


- 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: Li Zefan <lizf@cn.fujitsu.com>
---
 kernel/cgroup.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/kernel/cgroup.c b/kernel/cgroup.c
index 15ac0e1..f5a1273 100644
--- a/kernel/cgroup.c
+++ b/kernel/cgroup.c
@@ -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

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH] cgroup: anotate two variables with __read_mostly
@ 2008-06-05  6:02 Li Zefan
  0 siblings, 0 replies; 6+ messages in thread
From: Li Zefan @ 2008-06-05  6:02 UTC (permalink / raw)
  To: Andrew Morton; +Cc: Paul Menage, Linux Containers, LKML


- 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: Li Zefan <lizf-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org>
---
 kernel/cgroup.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/kernel/cgroup.c b/kernel/cgroup.c
index 15ac0e1..f5a1273 100644
--- a/kernel/cgroup.c
+++ b/kernel/cgroup.c
@@ -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

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] cgroup: anotate two variables with __read_mostly
       [not found] ` <48478187.7080204-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org>
@ 2008-06-05  6:35   ` Paul Menage
  2008-06-07  4:16   ` KOSAKI Motohiro
  1 sibling, 0 replies; 6+ messages in thread
From: Paul Menage @ 2008-06-05  6:35 UTC (permalink / raw)
  To: Li Zefan; +Cc: Linux Containers, Andrew Morton, LKML

On Wed, Jun 4, 2008 at 11:02 PM, Li Zefan <lizf-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org> wrote:
>
> - 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: Li Zefan <lizf-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org>

Acked-by: Paul Menage <menage-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>

Thanks.

Paul

> ---
>  kernel/cgroup.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/kernel/cgroup.c b/kernel/cgroup.c
> index 15ac0e1..f5a1273 100644
> --- a/kernel/cgroup.c
> +++ b/kernel/cgroup.c
> @@ -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
>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] cgroup: anotate two variables with __read_mostly
  2008-06-05  6:02 [PATCH] cgroup: anotate two variables with __read_mostly Li Zefan
       [not found] ` <48478187.7080204-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org>
@ 2008-06-05  6:35 ` Paul Menage
  2008-06-07  4:16 ` KOSAKI Motohiro
  2 siblings, 0 replies; 6+ messages in thread
From: Paul Menage @ 2008-06-05  6:35 UTC (permalink / raw)
  To: Li Zefan; +Cc: Andrew Morton, LKML, Linux Containers

On Wed, Jun 4, 2008 at 11:02 PM, Li Zefan <lizf@cn.fujitsu.com> wrote:
>
> - 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: Li Zefan <lizf@cn.fujitsu.com>

Acked-by: Paul Menage <menage@google.com>

Thanks.

Paul

> ---
>  kernel/cgroup.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/kernel/cgroup.c b/kernel/cgroup.c
> index 15ac0e1..f5a1273 100644
> --- a/kernel/cgroup.c
> +++ b/kernel/cgroup.c
> @@ -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
>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] cgroup: anotate two variables with __read_mostly
       [not found] ` <48478187.7080204-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org>
  2008-06-05  6:35   ` Paul Menage
@ 2008-06-07  4:16   ` KOSAKI Motohiro
  1 sibling, 0 replies; 6+ messages in thread
From: KOSAKI Motohiro @ 2008-06-07  4:16 UTC (permalink / raw)
  To: Li Zefan
  Cc: Linux Containers, Andrew Morton, Paul Menage, LKML,
	kosaki.motohiro-+CUm20s59erQFUHtdCDX3A

> 
> - 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: Li Zefan <lizf-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org>

nice :)
	Acked-by: KOSAKI Motohiro <kosaki.motohiro-+CUm20s59erQFUHtdCDX3A@public.gmane.org>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] cgroup: anotate two variables with __read_mostly
  2008-06-05  6:02 [PATCH] cgroup: anotate two variables with __read_mostly Li Zefan
       [not found] ` <48478187.7080204-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org>
  2008-06-05  6:35 ` Paul Menage
@ 2008-06-07  4:16 ` KOSAKI Motohiro
  2 siblings, 0 replies; 6+ messages in thread
From: KOSAKI Motohiro @ 2008-06-07  4:16 UTC (permalink / raw)
  To: Li Zefan
  Cc: kosaki.motohiro, Andrew Morton, LKML, Linux Containers,
	Paul Menage

> 
> - 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: Li Zefan <lizf@cn.fujitsu.com>

nice :)
	Acked-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>




^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2008-06-07  4:17 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-06-05  6:02 [PATCH] cgroup: anotate two variables with __read_mostly Li Zefan
     [not found] ` <48478187.7080204-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org>
2008-06-05  6:35   ` Paul Menage
2008-06-07  4:16   ` KOSAKI Motohiro
2008-06-05  6:35 ` Paul Menage
2008-06-07  4:16 ` KOSAKI Motohiro
  -- strict thread matches above, loose matches on Subject: below --
2008-06-05  6:02 Li Zefan

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.