linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: will.deacon@arm.com (Will Deacon)
To: linux-arm-kernel@lists.infradead.org
Subject: [RFC] ARM: kernel: io: Optimize memcpy_fromio function.
Date: Tue, 10 Sep 2013 10:05:41 +0100	[thread overview]
Message-ID: <20130910090541.GF5426@mudshark.cambridge.arm.com> (raw)
In-Reply-To: <522DFB81.20203@gmail.com>

On Mon, Sep 09, 2013 at 05:46:57PM +0100, Dirk Behme wrote:
> Am 09.09.2013 18:20, schrieb Pardeep Kumar Singla:
> > Currently memcpy_fromio function is copying byte by byte data.
> > By replacing this function with inline assembly code, it is copying now 32 bytes at one time.
> > By running two test cases(Tested on mx6qsabresd board),results are following :-
> >
> > a)First test case  by calling the memcpy_fromio function only once:-
> > 	1. With Optimization it is just taking 6 usec.
> > 	2. Without optimization it is taking 114usec.
> > b)Second test case by calling the memcpy_fromio function 100000 times.
> > 	1.With Optimization it is just taking .8 sec
> > 	2.Without optimization it is taking 11 sec.
> >
> > Signed-off-by: Pardeep Kumar Singla <b45784@freescale.com>
> 
> Is there any special reason trying to optimize memcpy_fromio() itself? 
> Instead of using anything like
> 
> http://lists.infradead.org/pipermail/linux-arm-kernel/2013-June/173195.html
> 
> ? I.e. using already existing optimized code?

Well, accessing device memory has additional restrictions over normal memory
(e.g. no unaligned access) and you may also not want to use
load/store-multiple if the device can't deal with repeated access to the
same location.

I think it's better to treat I/O separately to normal ram.

Will

      parent reply	other threads:[~2013-09-10  9:05 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-09 16:20 [RFC] ARM: kernel: io: Optimize memcpy_fromio function Pardeep Kumar Singla
2013-09-09 16:46 ` Dirk Behme
2013-09-09 17:30   ` Kumar Singla Pardeep-B45784
2013-09-10  9:05   ` Will Deacon [this message]

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=20130910090541.GF5426@mudshark.cambridge.arm.com \
    --to=will.deacon@arm.com \
    --cc=linux-arm-kernel@lists.infradead.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).