On Fri, Mar 23, 2007 at 10:00:00PM +0100, Franck Bui-Huu wrote: > On 3/23/07, Ralf Baechle <ralf@xxxxxxxxxxxxxx> 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