From: Solar Designer <solar@cannabis.dataforce.net>
Subject: Re: lmbench on Linux and DU, explanations welcome
Date: 1999/03/10 [thread overview]
Message-ID: <7c6a9r$pr3$1@prince.dataforce.net> (raw)
In-Reply-To: 7c633v$b$1@news.tuwien.ac.at
Anton Ertl <anton@mips.complang.tuwien.ac.at> wrote:
> ...
>> > However, it seems unlikely to me that this is the explanation for the
>> > differences in the 8K-16K range. So, my questions are:
>>
>> Isn't there a 50% chance of the two pages (or are there three, if the
Actually, that is assuming a uniform distribution, which we probably
don't get.
>> array isn't page-aligned?) getting mapped onto physical addresses
>> corresponding to the same half of the cache?
> For a direct-mapped physically indexed cache, yes. What is the
> organization of the L1 cache in the 21064A? One web page I read
> claimed it is virtually indexed, which would mean that the physical
> page mappings should be irrelevant (except maybe for inclusion in L2).
I've just found another web page, which lists 21064A as physically
indexed:
Processor level size line assoc wp index fow coher
------------------------------------------------------------------------------
DEC Alpha 21064A L1 16k 32 1 WT->L2 PIPT no
http://www.dcs.warwick.ac.uk/~john/cache-specs.html
The right way to find out for sure (well, almost) would probably be to
download the PDF from Digital/Compaq and read.
> I have made ten runs on Cabriolets under Linux (you can find runs from
> another machine with and without 512K cache in
> http://www.complang.tuwien.ac.at/anton/a4.ps.gz). They all have the
> step at 8K, not at 16K. The chance of this happening in ten runs by
> chance is 0.1%.
Not necessarily; the page mapping might depend on things such as the
size of your binary's sections, which remain the same over the runs.
>> While I don't have a good explanation, let me offer a simple benchmark
>> I did a while ago:
>>
>> ftp://ftp.dataforce.net/pub/solar/membench.c
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. :-)
> Here's what I got (results in MB/s read bandwidth):
> size Linux DU
> 1K 1497.11 1466.47
> 4K 1519.95 1538.94
> 7K 1494.72 1488.24
> 8K 1509.16 1490.77
> 9K 858.61 1492.08
> 15K 362.99 1515.74
> 16K 344.40 1516.17
> 17K 344.65 1069.26
> I.e., we get the same picture as with lmbench. The results under
> Linux look as if the machine had only 8K L1 D-cache, whereas under DU
> we get full L1 bandwidth up to the full 16K of the L1 D-cache.
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?
--
/sd
next prev parent 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 [this message]
1999-03-10 5:00 ` Anton Ertl
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