All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ralf Baechle <ralf@linux-mips.org>
To: Franck Bui-Huu <vagabon.xyz@gmail.com>
Cc: Miklos Szeredi <miklos@szeredi.hu>,
	linux-mips@linux-mips.org, Ravi.Pratap@hillcrestlabs.com
Subject: Re: flush_anon_page for MIPS
Date: Fri, 23 Mar 2007 15:20:01 +0000	[thread overview]
Message-ID: <20070323152001.GA19477@linux-mips.org> (raw)
In-Reply-To: <cda58cb80703230747w524409d7m3ee7753e676b0683@mail.gmail.com>

On Fri, Mar 23, 2007 at 03:47:45PM +0100, Franck Bui-Huu wrote:

> On 3/23/07, Ralf Baechle <ralf@linux-mips.org> wrote:
> >The other thing I still need to understand is why nobody actually seems
> >to have triggered this bug on MIPS so far.  I suppose our implementation
> >of flush_dcache_page() may have done a successful job at papering it
> >which means there might be some performance getting lost there as well.
> >
> 
> Just to understand, doesn't all mappings of shared anonymous pages and
> kernel addresses of them share the same cache lines ?

That's true only for all userspace mappings and an anonymous page should
normally have only a single mapping per mm anyway.  But to make things
more complicated a page of course also has a kernel space address in
KSEG0 or XKPHYS and on a VIPT cache there we frequently have the case
where the user address and the kernel address would map to a different
cache line.

Let me illustrate this with a little example.  Assume we have a page at
physical address 0x5000, a page size of 4kB, an 8kB direct mapped cache
and 32-byte cache lines.  Then address bits 0..4 will be the byte index
into the cache line, address bits 5..12 will index the cache array.  So
now let's map our page into userspace, at address 0x12340000.  In KSEG0
it is accessible at 0x80005000.  Now, compute the cache index for both
addresses compare and curse ...

  Ralf

  reply	other threads:[~2007-03-23 15:20 UTC|newest]

Thread overview: 50+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-22 22:28 flush_anon_page for MIPS Miklos Szeredi
2007-03-23 14:19 ` Ralf Baechle
2007-03-23 14:19   ` Ralf Baechle
2007-03-23 14:47   ` Franck Bui-Huu
2007-03-23 15:20     ` Ralf Baechle [this message]
2007-03-23 21:00       ` Franck Bui-Huu
2007-03-23 21:20         ` Ralf Baechle
2007-03-23 14:51   ` Ravi Pratap
2007-03-23 14:51     ` Ravi Pratap
2007-03-23 15:41     ` Atsushi Nemoto
2007-03-23 15:47       ` Ravi Pratap
2007-03-23 15:47         ` Ravi Pratap
2007-03-23 15:50         ` Atsushi Nemoto
2007-03-26 13:31           ` Atsushi Nemoto
2007-03-26 13:36             ` Ravi Pratap
2007-03-26 13:36               ` Ravi Pratap
2007-03-26 14:33               ` Ralf Baechle
2007-03-23 15:56         ` Ralf Baechle
2007-03-23 15:59           ` Ravi Pratap
2007-03-23 15:59             ` Ravi Pratap
2007-03-23 16:11             ` Maxime Bizon
2007-03-23 16:12             ` Franck Bui-Huu
2007-03-23 16:17               ` Ravi Pratap
2007-03-23 16:17                 ` Ravi Pratap
2007-03-23 19:06         ` Ralf Baechle
2007-03-23 22:17           ` Ravi Pratap
2007-03-23 22:17             ` Ravi Pratap
2007-03-23 23:36             ` Ralf Baechle
2007-03-24  0:03               ` David Daney
2007-03-26 13:33                 ` Ravi Pratap
2007-03-26 13:33                   ` Ravi Pratap
2007-03-26 14:05                   ` Ralf Baechle
2007-03-26 22:38                     ` Ravi Pratap
2007-03-26 22:38                       ` Ravi Pratap
2007-03-26 23:24                     ` Ravi Pratap
2007-03-26 23:24                       ` Ravi Pratap
2007-03-27  3:17                       ` Atsushi Nemoto
2007-03-27 14:51                         ` Ravi Pratap
2007-03-27 14:51                           ` Ravi Pratap
2007-03-28 14:25                         ` Ravi Pratap
2007-03-28 14:25                           ` Ravi Pratap
2007-03-28 17:10                           ` David Daney
2007-03-28 18:17                             ` Ravi Pratap
2007-03-28 18:17                               ` Ravi Pratap
2007-03-28 20:34                             ` Ralf Baechle
2007-03-28 20:38                               ` David Daney
2007-03-23 15:01   ` Franck Bui-Huu
2007-03-23 15:36     ` Ralf Baechle
2007-03-23 20:52       ` Franck Bui-Huu
2007-03-23 16:22   ` Miklos Szeredi

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=20070323152001.GA19477@linux-mips.org \
    --to=ralf@linux-mips.org \
    --cc=Ravi.Pratap@hillcrestlabs.com \
    --cc=linux-mips@linux-mips.org \
    --cc=miklos@szeredi.hu \
    --cc=vagabon.xyz@gmail.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.