lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Sun, 27 Mar 2011 11:57:59 +0300
From:	Maksym Planeta <mcsim.planeta@...il.com>
To:	Ingo Molnar <mingo@...e.hu>
Cc:	tglx@...utronix.de, kernel-janitors@...r.kernel.org,
	mingo@...hat.com, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] x86: page: get_order() optimization

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 linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ