From: "Paul Menage" <menage@google.com>
To: balbir@linux.vnet.ibm.com
Cc: "Andrew Morton" <akpm@linux-foundation.org>,
dhaval@linux.vnet.ibm.com, linux-kernel@vger.kernel.org,
balajirrao@gmail.com, containers@lists.osdl.org,
vatsa@linux.vnet.ibm.com, a.p.zijlstra@chello.nl
Subject: Re: [-mm] CPU controller statistics (v5)
Date: Wed, 11 Jun 2008 01:28:20 -0700 [thread overview]
Message-ID: <6599ad830806110128y24c9d222t44102e032198582c@mail.gmail.com> (raw)
In-Reply-To: <4847B3CB.5020700@linux.vnet.ibm.com>
On Thu, Jun 5, 2008 at 2:37 AM, Balbir Singh <balbir@linux.vnet.ibm.com> wrote:
>>
>> Can we avoid these tests? By requiring that cgroup_subsys.initialize()
>> always be non-zero? It might make sense, and it might not...
>>
>
> They are really hard to avoid, otherwise we might be taking away the flexibility
> we have.
And this is something that only gets called at startup.
>
>> Also, if this code is likely to be executed with any frequency then the
>> test of `early' could be inlined:
>>
>> static inline void cpu_cgroup_initialize(int early)
>> {
>> if (unlikely(!early))
>> __cpu_cgroup_initialize();
>> }
>>
>> yes?
>>
>
> Definitely
Er, no. It gets called twice at system boot (once with early=true and
once with early=false) via a vtable. So there's nothing to optimize
for, and making the function inline won't help since the compiler
needs to take its address.
Paul
next prev parent reply other threads:[~2008-06-11 8:28 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-03 20:05 Balbir Singh
2008-06-04 21:44 ` Andrew Morton
2008-06-05 9:37 ` Balbir Singh
2008-06-11 8:28 ` Paul Menage [this message]
2008-06-11 8:32 ` Paul Menage
2008-06-11 8:40 ` Balbir Singh
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=6599ad830806110128y24c9d222t44102e032198582c@mail.gmail.com \
--to=menage@google.com \
--cc=a.p.zijlstra@chello.nl \
--cc=akpm@linux-foundation.org \
--cc=balajirrao@gmail.com \
--cc=balbir@linux.vnet.ibm.com \
--cc=containers@lists.osdl.org \
--cc=dhaval@linux.vnet.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=vatsa@linux.vnet.ibm.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®