From: Russell King - ARM Linux <linux@arm.linux.org.uk>
To: linux-arm-kernel@lists.infradead.org
Subject: Re: v7_flush_kern_cache_louis flushes up to L2?
Date: Fri, 19 Apr 2013 10:48:10 +0000 [thread overview]
Message-ID: <20130419104810.GJ14496@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <20130419102142.GI14496@n2100.arm.linux.org.uk>
On Fri, Apr 19, 2013 at 11:21:42AM +0100, Russell King - ARM Linux wrote:
> On Wed, Apr 10, 2013 at 02:35:05PM +0100, Jonathan Austin wrote:
> > Note that on SMP, you would also need to clean/flush again after turning
> > off the caches, as read-speculation could have sucked dirty data from
> > another cache in to your cache, which would need to be written back
> > before sleeping.
>
> Err, no. If you read data into a cache, it is always populated in a clean
> state. You never suck dirty data out of one cache, remove it there and
> place it immediately in a dirty state in an upper level cache.
>
> So, if we start from the idea that reads will populate the upper level
> cache with clean data, that cache is populated merely with a _copy_ of
> the data held elsewhere in the system.
Hmm, Will tells me that later ARM cores can migrate dirty cache lines up
the cache tree, which means that we're potentially into deep problems
with CPU hotplug and suspend paths, because it means there's potentially
no way to ensure that we cleanly push data out the caches and shut the
caches down before the CPU goes down.
Combine this cache behaviour with the implementation specific details
about SCTRL.C (whether caches are just prevented from being allocated,
or whether it also affects the caches being searched) and you have a
recipe for multiple chunks of complex platform specific and CPU
specific code - especially when combined with things like removal of
CPU power and synchronisation of that in the hotplug case.
I do hope that ARM Ltd have thought about this, and have a way that we
can shut CPU caches down sanely, but I'm fearing that they haven't
really considered that to be something anyone really wants to do in a
generic way.
next prev parent reply other threads:[~2013-04-19 10:48 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-10 10:43 v7_flush_kern_cache_louis flushes up to L2? Bastian Hecht
2013-04-10 11:51 ` Jonathan Austin
2013-04-10 12:16 ` Bastian Hecht
2013-04-10 13:35 ` Jonathan Austin
2013-04-10 14:49 ` Bastian Hecht
2013-04-19 10:21 ` Russell King - ARM Linux
2013-04-19 10:48 ` Russell King - ARM Linux [this message]
2013-04-10 13:51 ` Lorenzo Pieralisi
2013-04-10 15:08 ` Bastian Hecht
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=20130419104810.GJ14496@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