From: Adrian Bunk <bunk@kernel.org>
To: Paul Menage <menage@google.com>
Cc: Paul Jackson <pj@sgi.com>, linux-kernel@vger.kernel.org
Subject: Re: [2.6 patch] kernel/cgroup.c: make 2 functions static
Date: Wed, 24 Oct 2007 18:41:13 +0200 [thread overview]
Message-ID: <20071024164113.GX30533@stusta.de> (raw)
In-Reply-To: <6599ad830710240932s57656f04y2d753453ce590707@mail.gmail.com>
On Wed, Oct 24, 2007 at 09:32:26AM -0700, Paul Menage wrote:
> On 10/24/07, Adrian Bunk <bunk@kernel.org> wrote:
> > cgroup_is_releasable() and notify_on_release() should be static,
> > not global inline.
> >
>
> They seem like they could be usefully static inline - or will the
> compiler inline them anyway since they're simple enough?
gcc [1] will currently always inline a static cgroup_is_releasable() as
long as it only has one caller.
Besides this, the compiler has the opportunity to inline all static
functions when it thinks this makes sense, and it can base it's decision
on things like whether we gave it -Os/-O2 and which CPU it's compiling
for.
Long term manually forced "inline" has negative effects since functions
tend to become larger and more often called without the "inline"
removed, so don't use it unless there is a visible performance
difference.
> Paul
cu
Adrian
[1] I'm talking about gcc 4
--
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed
next prev parent reply other threads:[~2007-10-24 16:56 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-24 16:23 [2.6 patch] kernel/cgroup.c: make 2 functions static Adrian Bunk
2007-10-24 16:32 ` Paul Menage
2007-10-24 16:41 ` Adrian Bunk [this message]
2007-10-24 16:46 ` Paul Menage
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=20071024164113.GX30533@stusta.de \
--to=bunk@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=menage@google.com \
--cc=pj@sgi.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.