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: Solar Designer Subject: Re: lmbench on Linux and DU, explanations welcome Date: 1999/03/10 Message-ID: <7c6ps1$up3$1@prince.dataforce.net>#1/1 X-Deja-AN: 453552029 References: <7c36ao$fnm$1@news.tuwien.ac.at> <7c50a1$btd$1@prince.dataforce.net> <7c633v$b$1@news.tuwien.ac.at> <7c6a9r$pr3$1@prince.dataforce.net> <7c6jsp$97o$1@news.tuwien.ac.at> Organization: DataForce ISP User-Agent: tin/pre-1.4-980226 (UNIX) (Linux/2.0.36 (i686)) Newsgroups: comp.os.linux.alpha Anton Ertl wrote: > Bit 12 (DC_16K) of the ABOX_CTL register controls whether the D-cache > is 8K (clear) or 16K (set). Now that's interesting. > 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 I've never tried it on a 21164A; looks like it can't really distinguish L1 from L2 there. It also expects the number of cache line sets to be a power of two (I didn't know the details of 21164 when I was trying this out two years ago). > Maybe it needs a little more work:-) Actually, it needs re-coding. ;-) > Would simply setting the DC_16K bit be enough? I doubt it; OSs > typically need special magic to deal with virtually-indexed caches. I am not familiar with such magic, so I'd better not comment on this. [ Sorry for bringing up a slightly different topic; I think that the information below is funny enough, and might be interesting for other readers of this newsgroup. ] I did, however, play around with cache control IPRs in the past; just like I expected, I was only able to change some of the timings on a running system. First, I needed this for slowing down the cache on a broken Multia VX40 (don't all of them get cache problems?) so that it didn't crash too fast; now I am doing the opposite on my 164SX-1M for better performance (1% to 5% for different applications, running since December, no crashes). What I would really like now, is a copy of the 164SX SROM code (that comes with EBSDK, but I don't feel like paying for overclocking, and I'm afraid that shipping into Russia might be a bit expensive). All I need is the 8K image (or is it 16K for 21164PC?). Now, here's the 21164PC-533/164SX-1M cache speedup Linux kernel module. The timings were adjusted for my particular board and might not work for others. USE AT YOUR OWN RISK. #define MODULE #define __KERNEL__ #include int init_module() { int *reg = (int *)0xfffffcfffff00008UL; int old, new; old = *reg; new = (old & ~0xfff00) | 0x25500; *reg = new; printk("CBOX_CONFIG: %x -> %x\n", old, new); return 1; } void cleanup_module() { } -- /sd