linux-mips
[Top] [All Lists]

Re: How to configure the cache size in r4000

To: Ralf Baechle <ralf@linux-mips.org>
Subject: Re: How to configure the cache size in r4000
From: "Maciej W. Rozycki" <macro@ds2.pg.gda.pl>
Date: Tue, 13 Jan 2004 17:48:17 +0100 (CET)
Cc: karthikeyan natarajan <karthik_96cse@yahoo.com>, linux-mips@linux-mips.org
In-reply-to: <20040113163543.GA31459@linux-mips.org>
Organization: Technical University of Gdansk
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <20040111124828.71884.qmail@web10103.mail.yahoo.com> <Pine.LNX.4.55.0401121345490.21851@jurand.ds.pg.gda.pl> <20040113163543.GA31459@linux-mips.org>
Sender: linux-mips-bounce@linux-mips.org
On Tue, 13 Jan 2004, Ralf Baechle wrote:

> >  You cannot modify the size of the primary caches -- the values are
> > hardwired to the amount of cache available in the processor (8kB+8kB for
> > the original R4000).  However, if you take appropriate precautions, you
> > can alter the line sizes of the caches by modifying appropriate bits of
> > cp0.config.
> 
> On some systems that's a dangerous and won't work due to some issue with
> the memory controller.  That's why Linux supports all possible combinations
> instead of reconfiguring caches.  Of course there's also the hope that
> developers of a system did configure the cache for the optimal performance.

 Plus there are processor errata related to certain values of line sizes.

> If reconfiguring is possible 32-byte D-cache and I-Cache lines are probably
> the optimum for non-tiny systems.  For the L2 cache I'd guess 64 or 128
> byte lines.

 Well, reconfiguring the line size of the L2 cache is system-specific and 
the size is most likely hardwired.

 BTW, the DECstation uses 16-byte lines for the D-cache and the I-Cache
and 32-byte lines for the S-cache.  With the S-cache size at 1MB and up to
480MB of RAM does it qualify as a tiny system? ;-)

  Maciej

-- 
+  Maciej W. Rozycki, Technical University of Gdansk, Poland   +
+--------------------------------------------------------------+
+        e-mail: macro@ds2.pg.gda.pl, PGP key available        +

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