linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Anton Blanchard <anton@samba.org>
To: Christophe Leroy <christophe.leroy@c-s.fr>
Cc: benh@kernel.crashing.org, paulus@samba.org, mpe@ellerman.id.au,
	agraf@suse.de, linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH] powerpc: Align hot loops of memset() and backwards_memcpy()
Date: Thu, 4 Aug 2016 20:36:09 +1000	[thread overview]
Message-ID: <20160804203609.73b02d85@kryten> (raw)
In-Reply-To: <c1370828-f149-5851-9a6d-3e7aeae54101@c-s.fr>

Hi Christophe,

> > 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 <anton@samba.org>  
> 
> 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

> > ---
> >  arch/powerpc/lib/mem_64.S | 2 ++
> >  1 file changed, 2 insertions(+)
> >
> > diff --git a/arch/powerpc/lib/mem_64.S b/arch/powerpc/lib/mem_64.S
> > index 43435c6..eda7a96 100644
> > --- a/arch/powerpc/lib/mem_64.S
> > +++ b/arch/powerpc/lib/mem_64.S
> > @@ -37,6 +37,7 @@ _GLOBAL(memset)
> >  	clrldi	r5,r5,58
> >  	mtctr	r0
> >  	beq	5f
> > +	.balign 16
> >  4:	std	r4,0(r6)
> >  	std	r4,8(r6)
> >  	std	r4,16(r6)
> > @@ -90,6 +91,7 @@ _GLOBAL(backwards_memcpy)
> >  	andi.	r0,r6,3
> >  	mtctr	r7
> >  	bne	5f
> > +	.balign 16
> >  1:	lwz	r7,-4(r4)
> >  	lwzu	r8,-8(r4)
> >  	stw	r7,-4(r6)
> >  
> 

  reply	other threads:[~2016-08-04 10:36 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-04  6:53 [PATCH] powerpc: Align hot loops of memset() and backwards_memcpy() Anton Blanchard
2016-08-04  7:49 ` Christophe Leroy
2016-08-04 10:36   ` Anton Blanchard [this message]
2016-08-05 11:00 ` Nicholas Piggin
2016-08-05 11:54   ` Anton Blanchard
2016-09-25 11:36   ` Anton Blanchard
2016-09-27 19:03     ` Nicholas Piggin
2016-10-05  2:36 ` Michael Ellerman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160804203609.73b02d85@kryten \
    --to=anton@samba.org \
    --cc=agraf@suse.de \
    --cc=benh@kernel.crashing.org \
    --cc=christophe.leroy@c-s.fr \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mpe@ellerman.id.au \
    --cc=paulus@samba.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).