linux-mips
[Top] [All Lists]

Re: flush_anon_page for MIPS

To: Franck Bui-Huu <vagabon.xyz@gmail.com>
Subject: Re: flush_anon_page for MIPS
From: Ralf Baechle <ralf@linux-mips.org>
Date: Fri, 23 Mar 2007 21:20:14 +0000
Cc: linux-mips@linux-mips.org
In-reply-to: <cda58cb80703231400n24023fahca5dee9608f90bba@mail.gmail.com>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <E1HUVlw-00034H-00@dorka.pomaz.szeredi.hu> <20070323141939.GB17311@linux-mips.org> <cda58cb80703230747w524409d7m3ee7753e676b0683@mail.gmail.com> <20070323152001.GA19477@linux-mips.org> <cda58cb80703231400n24023fahca5dee9608f90bba@mail.gmail.com>
Sender: linux-mips-bounce@linux-mips.org
User-agent: Mutt/1.4.2.2i
On Fri, Mar 23, 2007 at 10:00:00PM +0100, Franck Bui-Huu wrote:

> On 3/23/07, Ralf Baechle <ralf@linux-mips.org> wrote:
> >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 ...
> >
> 
> Yes but since the kernel page address is fixed, why not choosing
> userspace page addresses to share the same kernel cache index ?

That would require turning the memory allocator upside down to support
allocation of pages of a certain "color" which due to memory fragmentation
issues is seriously non-trivial.  Some UNIX variants do this scheme but
it doesn't come for free either and anyway, so far Linus' answer has been
a clear no.

  Ralf

<Prev in Thread] Current Thread [Next in Thread>