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

Anton Ertl <anton@mips.complang.tuwien.ac.at> 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 <linux/module.h>

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



  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
1999-03-10  5:00         ` Solar Designer [this message]
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             ` Richard Rogers
1999-03-16  5:00               ` Anton Ertl
1999-03-23  5:00                 ` 21064A D-cache is 8KB " Anton Ertl
1999-03-12  5:00             ` 21064A D-cache is 8KB under Linux 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