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

Anton Blanchard anton at samba.org
Fri Aug 5 21:54:37 AEST 2016


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 found this in a trace of nginx web serving. Looking back at it,
get_empty_filp() zeros a struct file, and we go through the loop 4
times. We might want to look more generally at what lengths memset() is
called with though.

Anton


More information about the Linuxppc-dev mailing list