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

From: Segher Boessenkool <[email-masked]>
Date: Thu, 2 Oct 2014 09:17:55 -0500

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.

Segher