From: Anton Blanchard <hidden> Date: 2016-08-04 06:53:39
From: Anton Blanchard <redacted>
Align the hot loops in our assembly implementation of memset()
and backwards_memcpy().
backwards_memcpy() is called from tcp_v4_rcv(), so we might
want to optimise this a little more.
Signed-off-by: Anton Blanchard <redacted>
---
arch/powerpc/lib/mem_64.S | 2 ++
1 file changed, 2 insertions(+)
From: Anton Blanchard <redacted>
Align the hot loops in our assembly implementation of memset()
and backwards_memcpy().
backwards_memcpy() is called from tcp_v4_rcv(), so we might
want to optimise this a little more.
Signed-off-by: Anton Blanchard <redacted>
Shouldn't this patch be titled powerpc/64, as powerpc32 has a different
memset() ?
Christophe
From: Anton Blanchard <hidden> Date: 2016-08-04 10:36:36
Hi Christophe,
quoted
Align the hot loops in our assembly implementation of memset()
and backwards_memcpy().
backwards_memcpy() is called from tcp_v4_rcv(), so we might
want to optimise this a little more.
Signed-off-by: Anton Blanchard <redacted>
Shouldn't this patch be titled powerpc/64, as powerpc32 has a
different memset() ?
Yeah, good point. Michael can you make this change if you choose to
merge it?
Anton
From: Nicholas Piggin <npiggin@gmail.com> Date: 2016-08-05 11:01:03
On Thu, 4 Aug 2016 16:53:22 +1000
Anton Blanchard [off-list ref] wrote:
quoted hunk
From: Anton Blanchard <redacted>
Align the hot loops in our assembly implementation of memset()
and backwards_memcpy().
backwards_memcpy() is called from tcp_v4_rcv(), so we might
want to optimise this a little more.
Signed-off-by: Anton Blanchard <redacted>
---
arch/powerpc/lib/mem_64.S | 2 ++
1 file changed, 2 insertions(+)
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.
From: Anton Blanchard <hidden> Date: 2016-08-05 11:54:58
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
From: Anton Blanchard <hidden> Date: 2016-09-25 11:37:21
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
From: Nicholas Piggin <npiggin@gmail.com> Date: 2016-09-27 19:03:26
On Sun, 25 Sep 2016 21:36:59 +1000
Anton Blanchard [off-list ref] wrote:
Hi Nick,
quoted
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.
Hi Anton,
I didn't have anything against the patch as such, I just wondered if
it's likely to be an overall win.
Thanks,
Nick
From: Michael Ellerman <hidden> Date: 2016-10-05 02:36:29
On Thu, 2016-04-08 at 06:53:22 UTC, Anton Blanchard wrote:
From: Anton Blanchard <redacted>
Align the hot loops in our assembly implementation of memset()
and backwards_memcpy().
backwards_memcpy() is called from tcp_v4_rcv(), so we might
want to optimise this a little more.
Signed-off-by: Anton Blanchard <redacted>