[Top] [All Lists]

Re: The impact to change page size to 16k for cache alias

To: 林建安 <>,
Subject: Re: The impact to change page size to 16k for cache alias
From: Ralf Baechle <>
Date: Tue, 31 Mar 2009 19:12:25 +0200
In-reply-to: <>
Original-recipient: rfc822;
References: <> <> <> <>
User-agent: Mutt/1.5.18 (2008-05-17)
On Wed, Apr 01, 2009 at 12:54:12AM +0800, Zhang Le wrote:

> > > Linux on Loongson 2E and 2F uses 16k page size to avoid cache alias 
> > > problem, too.
> > > However, I haven't encountered any problem on Linux kernel itself due to 
> > > 16k page
> > > size.
> > > 
> > > Anyway, I am not 100% familiar with Loongson patches, so I am not sure 
> > > whether
> > > the page size problem is already been taken care of in the patch. If you 
> > > are
> > > interested to find out yourself, you can get the whole source here:
> > >
> > 
> > I've got a report that Fulong is currently only working with 16k pages.  So
> > 4k is no longer the bullet proof choice for all cases :)
> Yes, at least from what I can tell.
> I have tried 4k before, because I heard someone told me the aliasing problem
> already can be taken care by software, namely Linux. But as it turned out, 16k
> is still necessary for the Loongson boxes to function properly.

Linux knows how to handle aliasing caches - the vast majority of MIPS
systems have aliasing caches and are running at 4k page size.  So the
issue is Loongson-specific.  This might be due to processor detection
not detecting the cache size, cache line size, number of ways correctly
or because loongson's caches has some unusual cache properties which the
Linux kernel is not designed to handle yet.

Btw, I just noticed that there is no
arch/mips/include/asm/mach-lemote/cpu-feature-overrides.h which is going
to impact code size and performance.


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