Linux MIPS Architecture development
 help / color / mirror / Atom feed
From: Ralf Baechle <ralf@linux-mips.org>
To: David VomLehn <dvomlehn@cisco.com>
Cc: "linux-mips@linux-mips.org" <linux-mips@linux-mips.org>
Subject: Re: Anyone noticed that there are a lot of cache flushes after kunmap/kunmap_atomic is called?
Date: Fri, 8 Aug 2008 09:24:04 +0100	[thread overview]
Message-ID: <20080808082404.GA27519@linux-mips.org> (raw)
In-Reply-To: <489A5975.1000401@cisco.com>

On Wed, Aug 06, 2008 at 07:09:57PM -0700, David VomLehn wrote:

> On the MIPS processor, cache flushing is done based on virtual addresses. 
> However, in the Linux kernel, there are a lot of places where memory is 
> mapped with kmap or kmap_atomic, then unmapped with the corresponding 
> kunmap or kunmap_atomic and only *then* is the cache flushed. In other 
> words, we only flush the cache after we have dropped the mapping of 
> memory into a virtual address. I think this is generally wrong.
>
> This may really only affect those of us who have enabled high memory, but 
> it's pretty prevalent in kernel code. We noted this before, but have 
> apparently just been bitten by it. Is it just me or is there a fairly 
> widespread problem for processors that flush the cache using virtual 
> addresses?

Not all MIPS processors have virtually indexed caches; some have physically
indexed caches or caches which behave effectivly like physically indexed
and MIPS highmem only tries to support the latter kinds of caches.  Which
means most of the cache flushes turn into nops anyway.

  Ralf

  reply	other threads:[~2008-08-08  8:24 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-07  2:09 Anyone noticed that there are a lot of cache flushes after kunmap/kunmap_atomic is called? David VomLehn
2008-08-08  8:24 ` Ralf Baechle [this message]
2008-08-08 14:41   ` Jon Fraser
2008-08-11 23:19     ` David VomLehn
2008-08-12  0:49       ` Jon Fraser
2008-08-12  9:57 ` Kevin D. Kissell

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=20080808082404.GA27519@linux-mips.org \
    --to=ralf@linux-mips.org \
    --cc=dvomlehn@cisco.com \
    --cc=linux-mips@linux-mips.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