All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ralf Baechle <ralf@linux-mips.org>
To: 林建安 <colin@realtek.com.tw>, linux-mips@linux-mips.org
Subject: Re: The impact to change page size to 16k for cache alias
Date: Tue, 31 Mar 2009 19:12:25 +0200	[thread overview]
Message-ID: <20090331171225.GC24154@linux-mips.org> (raw)
In-Reply-To: <20090331165412.GA4918@adriano.hkcable.com.hk>

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:
> > > http://repo.or.cz/w/linux-2.6/linux-loongson.git
> > 
> > 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.

  Ralf

  reply	other threads:[~2009-03-31 17:12 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-30  4:06 The impact to change page size to 16k for cache alias 林建安
2009-03-30  4:06 ` 林建安
2009-03-30  8:24 ` Zhang Le
2009-03-31  8:11   ` Ralf Baechle
2009-03-31 16:54     ` Zhang Le
2009-03-31 17:12       ` Ralf Baechle [this message]
2009-03-31 18:09         ` Zhang Le
2009-03-30  8:55 ` Ralf Baechle
  -- strict thread matches above, loose matches on Subject: below --
2009-03-31 19:43 Peter Watkins

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=20090331171225.GC24154@linux-mips.org \
    --to=ralf@linux-mips.org \
    --cc=colin@realtek.com.tw \
    --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 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.