From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111c93,59ca3b26f2b9f750 X-Google-Attributes: gid111c93,public From: anton@mips.complang.tuwien.ac.at (Anton Ertl) Subject: Re: lmbench on Linux and DU, explanations welcome Date: 1999/03/10 Message-ID: <7c633v$b$1@news.tuwien.ac.at>#1/1 X-Deja-AN: 453414647 References: <7c36ao$fnm$1@news.tuwien.ac.at> <7c50a1$btd$1@prince.dataforce.net> Organization: Institut fuer Computersprachen, Technische Universitaet Wien Newsgroups: comp.os.linux.alpha In article <7c50a1$btd$1@prince.dataforce.net>, Solar Designer writes: > Anton Ertl wrote: > > I have run lmbench 1.1 on the same motherboard (a Cabriolet with a > > 300MHz 21064a and 2MB L2 cache) under both Digital Unix and Linux. > > You can see the results at > > http://www.complang.tuwien.ac.at/anton/a2a3.ps.gz. An HTML page about > > this is available at > > http://www.complang.tuwien.ac.at/anton/lmbench-linux-vs-du.html ... > > 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 > 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 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%. > 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 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. > P.S. Finally an opportunity to thank you for publishing the GCC "Labels > as Values" optimization for virtual machines that I've made use of. :-) Actually the work was done by the GCC people, I only used it and wrote about it. - 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