Re: test10-pre1 problems on 4-way SuperServer8050

From: David Wragg (
Date: Thu Oct 12 2000 - 08:18:14 EST

Richard Gooch <> writes:
> David Wragg writes:
> > mtrr.c is broken for machines with >=4GB of memory (or less than 4GB,
> > if the chipset reserves an addresses range below 4GB for PCI).
> >
> > The patch against 2.4.0-test9 to fix this is below.
> >
> > Richard: Is there a reason you haven't passed this on to Linus, or do
> > you want me to do it?
> Partly because I haven't had time to look at it, partly because I'm
> not sure if it's needed (why, exactly?)

Because mtrr.c throws away the top 4 bits of 36-bit physical
addresses, it gives misleading /proc/mtrr output on machines with
>=4GB of memory, which I think requires a fix on its own. But worse,
if it tries to make MTRR changes on such a machine, you can get bogus
MTRR settings. This can ruin a machine's performance (if real memory
ends up write combined or uncached) or give hardware instabilities (if
a device's MMIO area gets the wrong memory type).

So far, this probably hasn't bitten too many people, since relatively
few Linux x86 users have >=4GB memory, and /proc/mtrr hasn't usually
been altered without explicit intervention. But with XFree86-4
finally "out there" and more kernel drivers using MTRRs, this can only
get worse.

(Whether Tigran's performance problems are actually down to the mtrr.c
issue, I don't know. It's not worth hypothesizing until we have
accurate /proc/mtrr output.)

When I checked the 2.2 version of my patch, it didn't involve a
significant increase in code size.

> and partly because I've
> recently moved house and (STILL!) don't have IP access at home (not
> even dialup) so I can't really look at stuff yet

Ok. I'll wait for feedback from Tigran, and if I don't get anything
negative I'll submit to Linus. The 2.2 version of my patch fixes
problems for other people, VA Linux have included it in their kernel
for a while with no problems that have been reported back to me), and
it's silly that it isn't in 2.4testX. I should have addressed this a
while ago, but I have my own distractions from kernel hacking.

Later on, you can send a mtrr.c maintenance patch, if you like.

I've just caught up on this whole thread, and I don't have any
objections in principle to Zoltan's patch being used instead of mine,
though I'd like to take a look at it first.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
Please read the FAQ at

This archive was generated by hypermail 2b29 : Sun Oct 15 2000 - 21:00:22 EST