From: linux@arm.linux.org.uk (Russell King - ARM Linux)
To: linux-arm-kernel@lists.infradead.org
Subject: [RFC] mmaping with VIVT cache
Date: Fri, 17 Sep 2010 22:06:49 +0100 [thread overview]
Message-ID: <20100917210649.GA18343@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <589851.42712.qm@web120206.mail.ne1.yahoo.com>
On Fri, Sep 17, 2010 at 12:07:50PM -0700, P F wrote:
> From your comment, I take it that there is no kernel API to invalidate the
> cache of a range in a VMA. Do you think linux-mm would be a more
> appropriate forum to continue investigating? Any input would be
> appreciated.
That's not really the point. To implement an API in terms of "it
invalidates a range in a VMA" is absurd when you have a kernel
supporting VIVT, VIVT with an address space tag, VIPT, VIPT with
address space tag, PIPT, etc. Does it mean you have to invalidate
for every different kind of cache? If you define it in terms of
"invalidates a range in a VMA" then yes it does - even if a cache
architecture doesn't need it.
It's much better to define APIs in terms of their purpose - such as
"we're tearing down MMU mappings, so flush this range in the VMA".
That allows implementations to say "do I need to do anything when
this operation occurs? No - I can optimize it away."
The problem we face is that you wouldn't port a Unix-like OS to a
CPU with VIVT caches if you were in a sane state of mind... It
is the worst for aliasing issues, such as the one you've found. As
ARM is the only Linux arch which has VIVT caches, we trip over many
of these issues.
However, in this case, architectures using VIPT aliasing caches will
also trip over it - has anyone used this webcam on something like
Sparc or powerpc? I'm guessing that it'll fail there too...
next prev parent reply other threads:[~2010-09-17 21:06 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-17 19:07 [RFC] mmaping with VIVT cache P F
2010-09-17 21:06 ` Russell King - ARM Linux [this message]
2010-09-20 10:38 ` Pawel Moll
2010-09-20 10:50 ` Russell King - ARM Linux
2010-09-20 11:31 ` Pawel Moll
-- strict thread matches above, loose matches on Subject: below --
2010-09-16 0:25 P F
2010-09-16 23:05 ` Russell King - ARM Linux
2010-09-13 19:58 P F
2010-09-14 23:50 ` Russell King - ARM Linux
2010-09-15 1:06 ` Eric Miao
2010-09-15 7:31 ` Russell King - ARM Linux
2010-09-15 7:37 ` Eric Miao
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=20100917210649.GA18343@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).