[PATCH v2] powerpc: Speed up clear_page by unrolling it

Segher Boessenkool segher at kernel.crashing.org
Fri Oct 3 00:17:55 EST 2014

On Thu, Oct 02, 2014 at 03:44:21PM +1000, Anton Blanchard wrote:
> This assumes cacheline sizes won't grow beyond 512 bytes or
> page sizes wont drop below 1kB,

Or a combination of those.

> Michael found that some versions of gcc produce quite bad code
> (all multiplies), so we give gcc a hand by using shifts and adds.

You can make the code a lot less cluttered as well as making the
generated code independent of compiler version by writing the setup
of twox..eightx in the asm block itself.


More information about the Linuxppc-dev mailing list