From: Maksym Planeta <mcsim.planeta@gmail.com>
To: Ingo Molnar <mingo@elte.hu>
Cc: tglx@linutronix.de, kernel-janitors@vger.kernel.org,
mingo@redhat.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] x86: page: get_order() optimization
Date: Sun, 27 Mar 2011 11:57:59 +0300 [thread overview]
Message-ID: <1301216279.15393.9.camel@debian> (raw)
In-Reply-To: <20110323100757.GA14245@elte.hu>
On Wed, 23/03/2011 at 11:07 +0100, Ingo Molnar wrote:
> Ok, that's certainly a nice optimization.
Thanks, I rewrote patch according to your observations.
> One detail: in many cases 'size' is a constant. Have you checked recent GCC,
> does it turn the generic version of get_order() into a loop even for constants,
> or is it able does it perhaps recognize the pattern and precompute the result?
Yes, gcc precomputes the result, so I added case for constants.
> With no #ifdefs in get_order().
And removed #ifdefs from get_order().
--
Thanks,
Maksym Planeta
next prev parent reply other threads:[~2011-03-27 8:56 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-19 16:25 [PATCH] x86: page: get_order() optimization Maksym Planeta
2011-03-23 10:07 ` Ingo Molnar
2011-03-27 8:57 ` Maksym Planeta [this message]
-- strict thread matches above, loose matches on Subject: below --
2011-03-19 16:08 Maksym Planeta
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=1301216279.15393.9.camel@debian \
--to=mcsim.planeta@gmail.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
/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).