From: arnd@arndb.de (Arnd Bergmann)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM: cache-l2x0: optimize aurora range operations
Date: Thu, 11 Sep 2014 12:20:42 +0200 [thread overview]
Message-ID: <3371190.Z44AUJudFN@wuerfel> (raw)
In-Reply-To: <20140911120839.59d4b728@free-electrons.com>
On Thursday 11 September 2014 12:08:39 Thomas Petazzoni wrote:
> On Mon, 08 Sep 2014 22:43:32 +0200, Arnd Bergmann wrote:
> > The aurora_inv_range(), aurora_clean_range() and aurora_flush_range()
> > functions are highly redundant, both in source and in object code, and
> > they are harder to understand than necessary.
> >
> > By moving the range loop into the aurora_pa_range() function, they
> > become trivial wrappers, and the object code start looking like what
> > one would expect for an optimal implementation.
> >
> > Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> > ---
> > arch/arm/mm/cache-l2x0.c | 67 +++++++++++++++++-----------------------------------------
> > 1 file changed, 22 insertions(+), 45 deletions(-)
>
> Tested-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> (on Armada 370 RD and Armada XP GP, boot tested, plus a little bit of
> DMA traffic by reading data from a SD card)
>
Ok, thanks!
I wonder if it's worth doing benchmarks over this, as there is still a
little optimization potential in the range function if we hold the
spinlock a little longer. Right now we drop and reacquire the lock
for every 1024 bytes being flushed, which can cause a lot of traffic
on the coherency bus if we flush really long ranges.
We could hold the lock across the entire loop to improve that, but
that can also cause extra latency if multiple CPUs try to do cache
operations simultaneously.
Arnd
prev parent reply other threads:[~2014-09-11 10:20 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-08 14:53 [PATCH] ARM: avoid l2x0 build warning for CONFIG_OF=n Arnd Bergmann
2014-09-08 15:39 ` Russell King - ARM Linux
2014-09-08 20:36 ` Arnd Bergmann
2014-09-08 20:42 ` [PATCH 1/2] ARM: cache-l2x0: clean up aurora cache handling Arnd Bergmann
2014-09-11 8:54 ` Thomas Petazzoni
2014-09-11 9:50 ` Arnd Bergmann
2014-09-11 10:07 ` Thomas Petazzoni
2014-09-11 10:16 ` Russell King - ARM Linux
2014-09-11 10:31 ` Thomas Petazzoni
2014-09-11 10:08 ` Thomas Petazzoni
2014-09-08 20:43 ` [PATCH] ARM: cache-l2x0: optimize aurora range operations Arnd Bergmann
2014-09-11 9:13 ` Thomas Petazzoni
2014-09-11 10:08 ` Thomas Petazzoni
2014-09-11 10:20 ` Arnd Bergmann [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=3371190.Z44AUJudFN@wuerfel \
--to=arnd@arndb.de \
--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).