Usenet comp.os.linux.alpha (1997-2013)
 help / color / mirror / Atom feed
From: anton@mips.complang.tuwien.ac.at (Anton Ertl)
Subject: Re: lmbench on Linux and DU, explanations welcome
Date: 1999/03/10	[thread overview]
Message-ID: <7c6jsp$97o$1@news.tuwien.ac.at> (raw)
In-Reply-To: 7c6a9r$pr3$1@prince.dataforce.net

In article <7c6a9r$pr3$1@prince.dataforce.net>,
 Solar Designer <solar@cannabis.dataforce.net> writes:
> Anton Ertl <anton@mips.complang.tuwien.ac.at> wrote:
> The right way to find out for sure (well, almost) would probably be to
> download the PDF from Digital/Compaq and read.

I did that. The document is
http://ftp.digital.com/pub/Digital/info/semiconductor/literature/21064ads.pdf

It says on page 11, that there are two modes of using the D-cache: as
8K direct mapped cache; and as 16K cache that appears internally as
virtually-indexed direct-mapped cache; externally (I guess this means
for cache consistency bus snoops) it appears as 2-way set-associative
cache. The manual has a funny way of spelling "virtually-indexed":
"Virtual address [13] and physical address [12:5] are the index into
the cache."

Bit 12 (DC_16K) of the ABOX_CTL register controls whether the D-cache
is 8K (clear) or 16K (set).

I bet that our Cabriolets run in 8K-D-Cache mode.

> And also an old proof-of-concept program for detecting L1 data cache
> size and associativeness (actually, in the opposite order):
> 
> ftp://ftp.dataforce.net/pub/solar/cache.c
> 
> The code is a bit dirty, but seems to work most of the time (there're
> a few exceptions though, such as under a high load).  For example,
> on my 21164PC, it reports:
> L1 data cache: 8 Kb, direct-mapped
> and on a Pentium II:
> L1 data cache: 16 Kb, 4-way associative
> both seem correct. :-)

On a Cabriolet under DU this gives:

L1 data cache: 16 Kb, direct-mapped

Looks right. On a Cabriolet under Linux this gives:

L1 data cache: 8 Kb, 4-way associative

Hmm, let's try another run:

L1 data cache: 8 Kb, direct-mapped

Another run, same result. More runs, various results:-( Back to ZDU,
varying results. On a 21164A this program produces

[a5:~/ftp:1001] a.out
Working...
L1 data cache: 32 Kb, 2-way associative
[a5:~/ftp:1002] a.out
Working...
L1 data cache: 32 Kb, 2-way associative
[a5:~/ftp:1003] a.out
Working...
L1 data cache: 64 Kb, 4-way associative

Maybe it needs a little more work:-)

> Yes.  It does indeed look like Linux doesn't use the full cache;
> I guess it might be time to check the PALcode.  How are you booting
> Linux?  Are you using the correct MILO image, if any?

We are booting ARC->MILO->Linux, and we use a Cabriolet MILO.

Would simply setting the DC_16K bit be enough?  I doubt it; OSs
typically need special magic to deal with virtually-indexed caches.

- anton
-- 
M. Anton Ertl                    Some things have to be seen to be believed
anton@mips.complang.tuwien.ac.at Most things have to be believed to be seen
http://www.complang.tuwien.ac.at/anton/home.html



  reply	other threads:[~1999-03-10  5:00 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-03-09  5:00 lmbench on Linux and DU, explanations welcome Anton Ertl
1999-03-10  5:00 ` Solar Designer
1999-03-10  5:00   ` Anton Ertl
1999-03-10  5:00     ` Solar Designer
1999-03-10  5:00       ` Anton Ertl [this message]
1999-03-10  5:00         ` Solar Designer
1999-03-11  5:00           ` 21064A D-cache is *KB under Linux (was: lmbench on Linux and DU...) Anton Ertl
1999-03-12  5:00             ` 21064A D-cache is 8KB under Linux Anton Ertl
1999-03-12  5:00             ` 21064A D-cache is *KB under Linux (was: lmbench on Linux and DU...) Richard Rogers
1999-03-16  5:00               ` Anton Ertl
1999-03-23  5:00                 ` 21064A D-cache is 8KB " Anton Ertl
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox