linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Li Zefan <lizf@cn.fujitsu.com>
To: Glauber Costa <glommer@parallels.com>
Cc: linux-kernel@vger.kernel.org, jbottomley@parallels.com,
	cgroups@vger.kernel.org, bsingharora@gmail.com, devel@openvz.org,
	kamezawa.hiroyu@jp.fujitsu.com, tj@kernel.org
Subject: Re: [PATCH 1/3] nitpick: make simple functions inline
Date: Wed, 14 Dec 2011 09:09:25 +0800	[thread overview]
Message-ID: <4EE7F745.3040508@cn.fujitsu.com> (raw)
In-Reply-To: <1323614738-7405-3-git-send-email-glommer@parallels.com>

22:45, Glauber Costa wrote:
> Those are quite simple bit-testing functions that are
> only used within this file. Not reason for them not to
> be inline.
> 

It's better to leave the optimization decision to gcc.

And I've confirmed they are inlined by gcc in my box.

(btw, please add "cgroup" prefix to the patch subject line)

> Signed-off-by: Glauber Costa <glommer@parallels.com>
> ---
>  kernel/cgroup.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/kernel/cgroup.c b/kernel/cgroup.c
> index d9d5648..e4b9d3c 100644
> --- a/kernel/cgroup.c
> +++ b/kernel/cgroup.c
> @@ -241,12 +241,12 @@ static int cgroup_is_releasable(const struct cgroup *cgrp)
>  	return (cgrp->flags & bits) == bits;
>  }
>  
> -static int notify_on_release(const struct cgroup *cgrp)
> +static inline int notify_on_release(const struct cgroup *cgrp)
>  {
>  	return test_bit(CGRP_NOTIFY_ON_RELEASE, &cgrp->flags);
>  }
>  
> -static int clone_children(const struct cgroup *cgrp)
> +static inline int clone_children(const struct cgroup *cgrp)
>  {
>  	return test_bit(CGRP_CLONE_CHILDREN, &cgrp->flags);
>  }

  parent reply	other threads:[~2011-12-14  1:07 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-11 14:45 [PATCH 0/3] Simple cleanups for cgroups Glauber Costa
2011-12-11 14:45 ` [PATCH] make clone_children a flag Glauber Costa
2011-12-11 14:48   ` Glauber Costa
2011-12-11 14:45 ` [PATCH 1/3] nitpick: make simple functions inline Glauber Costa
2011-12-11 18:55   ` KOSAKI Motohiro
2011-12-11 20:44     ` Glauber Costa
2011-12-12 17:27       ` Tejun Heo
2011-12-14  1:09   ` Li Zefan [this message]
2011-12-11 14:45 ` [PATCH 2/3] make clone_children a flag Glauber Costa
2011-12-11 18:58   ` KOSAKI Motohiro
2011-12-13 15:39   ` Tejun Heo
2011-12-14  2:29     ` Li Zefan
2011-12-14  7:09       ` Glauber Costa
2011-12-14 18:18         ` Tejun Heo
2011-12-15  7:03           ` Glauber Costa
2011-12-11 14:45 ` [PATCH 3/3] make 'none' field " Glauber Costa
2011-12-11 18:59   ` KOSAKI Motohiro
2011-12-13 15:41   ` Tejun Heo
2011-12-14  2:09     ` 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=4EE7F745.3040508@cn.fujitsu.com \
    --to=lizf@cn.fujitsu.com \
    --cc=bsingharora@gmail.com \
    --cc=cgroups@vger.kernel.org \
    --cc=devel@openvz.org \
    --cc=glommer@parallels.com \
    --cc=jbottomley@parallels.com \
    --cc=kamezawa.hiroyu@jp.fujitsu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tj@kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).