All of lore.kernel.org
 help / color / mirror / Atom feed
From: Philippe Bergheaud <felix@linux.vnet.ibm.com>
To: Michael Neuling <mikey@neuling.org>
Cc: Linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH] powerpc: memcpy optimization for 64bit LE
Date: Wed, 06 Nov 2013 11:21:51 +0100	[thread overview]
Message-ID: <527A183F.7030500@linux.vnet.ibm.com> (raw)
In-Reply-To: <11438.1383718966@ale.ozlabs.ibm.com>

Michael Neuling wrote:
> Philippe Bergheaud <felix@linux.vnet.ibm.com> wrote:
> 
> 
>>Unaligned stores take alignment exceptions on POWER7 running in little-endian.
>>This is a dumb little-endian base memcpy that prevents unaligned stores.
>>It is replaced by the VMX memcpy at boot.
> 
> 
> Is this any faster than the generic version?

The little-endian assembly code of the base memcpy is similar to the code emitted by gcc when compiling the generic memcpy in lib/string.c, and runs at the same speed.
However, a little-endian assembly version of the base memcpy is required (as opposed to a C version), in order to use the self-modifying code instrumentation system.
After the cpu feature CPU_FTR_ALTIVEC is detected at boot, the slow base memcpy is nop'ed out, and the fast memcpy_power7 is used instead.

Philippe

  reply	other threads:[~2013-11-06 10:23 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-05  8:38 [PATCH] powerpc: memcpy optimization for 64bit LE Philippe Bergheaud
2013-11-06  6:22 ` Michael Neuling
2013-11-06 10:21   ` Philippe Bergheaud [this message]
2013-11-07  2:10     ` Michael Neuling
2013-11-07 13:01       ` [PATCH v2] " Philippe Bergheaud
2013-11-07  2:07   ` [PATCH] " Anton Blanchard
  -- strict thread matches above, loose matches on Subject: below --
2014-04-29 23:10 Anton Blanchard
2014-04-29 23:12 ` Anton Blanchard
2014-05-05 12:56 ` Philippe Bergheaud

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=527A183F.7030500@linux.vnet.ibm.com \
    --to=felix@linux.vnet.ibm.com \
    --cc=Linuxppc-dev@lists.ozlabs.org \
    --cc=mikey@neuling.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.