Subject: Re: [PATCH] powerpc: Align hot loops of memset() and backwards_memcpy()

From: Anton Blanchard <[email-masked]>
Date: Sun, 25 Sep 2016 21:36:59 +1000

Hi Nick,

> Hmm. If we execute this loop once, we'll only fetch additional nops.
> Twice, and we make up for them by not fetching unused instructions.
> More than twice and we may start winning.
> 
> For large sizes it probably helps, but I'd like to see what sizes
> memset sees.

I noticed this in an nginx web serving test. There are some 1 and 2
iteration calls, but quite a few larger ones - get_empty_filp() goes for
4 iterations and sk_prot_alloc() for 26 iterations.

Anton