From: linux@arm.linux.org.uk (Russell King - ARM Linux)
To: linux-arm-kernel@lists.infradead.org
Subject: cachepolicy on arm UP/SMP
Date: Wed, 27 Apr 2011 21:09:01 +0100 [thread overview]
Message-ID: <20110427200901.GV17290@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <BANLkTi=6t=iLNcWPCtOoDai50A5N9m08UQ@mail.gmail.com>
On Wed, Apr 27, 2011 at 06:10:34PM +0100, Catalin Marinas wrote:
> 2011/4/2 rocky <bill_carson@126.com>:
> > I am a little confused about arm cachepolicy for UP/SMP.
> >
> > in arch/arm/mm/mmu.c
> > for UP , default cache policy is CPOLICY_WRITEBACK;
> > while for SMP, cache policy is overrided with? WRITEALLOC.
> >
> > why does SMP cannot use WRITEBACK?
> > It is about coherency issue?
>
> Historical reasons I think because ARM11MPCore only supported WBWA
> caches, though even if only WB configuration was set.
>
> Note that WB or WBWA is just a hint and the processor is allowed to do
> write allocation or ignore it. We could simply make both the same at
> least on ARMv6+ hardware (and I'm more in favour of WBWA).
The WB vs WBWA argument is rather religious. It really depends a lot on
your workload.
While you can measure things like "ooh, it makes memcpy lots faster",
that alone is not the full story - it may make memcpy faster, but if your
application isn't about copying lots of data, but making random accesses,
it could result in a net performance loss instead.
So, leaving things as-is (being the established status quo) is best.
Those who have applications moving lots of data about without the
benefits of zero copy can easily enable WBWA if they so choose.
prev parent reply other threads:[~2011-04-27 20:09 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-02 3:59 cachepolicy on arm UP/SMP rocky
2011-04-27 17:10 ` Catalin Marinas
2011-04-27 20:09 ` Russell King - ARM Linux [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=20110427200901.GV17290@n2100.arm.linux.org.uk \
--to=linux@arm.linux.org.uk \
--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).