All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Paul Menage" <menage@google.com>
To: "Li Zefan" <lizf@cn.fujitsu.com>
Cc: "Andrew Morton" <akpm@linux-foundation.org>,
	LKML <linux-kernel@vger.kernel.org>,
	"Linux Containers" <containers@lists.linux-foundation.org>
Subject: Re: [PATCH] cgroup: anotate two variables with __read_mostly
Date: Wed, 4 Jun 2008 23:35:56 -0700	[thread overview]
Message-ID: <6599ad830806042335o7d8b93bdw13072267e4c5b455@mail.gmail.com> (raw)
In-Reply-To: <48478187.7080204@cn.fujitsu.com>

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
>

  reply	other threads:[~2008-06-05  6:36 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-05  6:02 [PATCH] cgroup: anotate two variables with __read_mostly Li Zefan
2008-06-05  6:35 ` Paul Menage [this message]
2008-06-07  4:16 ` KOSAKI Motohiro
     [not found] ` <48478187.7080204-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org>
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6599ad830806042335o7d8b93bdw13072267e4c5b455@mail.gmail.com \
    --to=menage@google.com \
    --cc=akpm@linux-foundation.org \
    --cc=containers@lists.linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lizf@cn.fujitsu.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.