[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kernel-janitors
Subject:    Re: [PATCH] x86: page: get_order() optimization
From:       Maksym Planeta <mcsim.planeta () gmail ! com>
Date:       2011-03-27 8:57:59
Message-ID: 1301216279.15393.9.camel () debian
[Download RAW message or body]

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

--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic