[ltp] SuperSavage IX and MTRR

Edi Weitz linux-thinkpad@www.bm-soft.com
18 May 2002 20:52:00 +0200


Hi!

I usually prefer going to the movies to watching DVDs. Nevertheless,
when I got my new T23 two weeks ago I was tempted to check whether it
would be feasible to watch DVDs with Linux on this laptop. (My
conclusion is: It is possible, kind of, but not worth it. Should I
ever want to watch a DVD, I'll use my wife's PowerBook or boot into
Windows. But that's not what this message is about...)

While I was messing around with my kernel to improve DVD playback
quality, I enabled MTRR support. After I did that, I noticed that the
X server (the one that came with XFree86 4.2) issued a lot of warnings
like...

  (WW) SAVAGE(0): Failed to set up write-combining range (0xe8e60000,0x70000)
  (WW) SAVAGE(0): Failed to set up write-combining range (0xe8e50000,0x80000)
  (WW) SAVAGE(0): Failed to set up write-combining range (0xe8e40000,0x90000)
  (WW) SAVAGE(0): Failed to set up write-combining range (0xe8e30000,0xa0000)

actually more than 200 of them. Looking at the X server log revealed
that the WC ranges were partitioned like mad, i.e. I saw hundreds of
messages like...

  (II) SAVAGE(0): Splitting WC range: base: 0xe8be0000, size: 0x2f0000
  (II) SAVAGE(0): Splitting WC range: base: 0xe8bf0000, size: 0x2e0000

which resulted in the large amount of WC ranges while the P6 family
processors obviously only has eight ranges available. This whole
operation resulted in

  edi@bird:~> cat /proc/mtrr 
  reg00: base=0x00000000 (   0MB), size= 512MB: write-back, count=1
  reg01: base=0x20000000 ( 512MB), size= 256MB: write-back, count=1
  reg02: base=0xe8ec0000 (3726MB), size=  64KB: write-combining, count=1
  reg03: base=0xe8eb0000 (3726MB), size=  64KB: write-combining, count=1
  reg04: base=0xe8ea0000 (3726MB), size=  64KB: write-combining, count=1
  reg05: base=0xe8e90000 (3726MB), size=  64KB: write-combining, count=1
  reg06: base=0xe8e80000 (3726MB), size=  64KB: write-combining, count=1
  reg07: base=0xe8e70000 (3726MB), size=  64KB: write-combining, count=1

while the X server was running. (A quick test with the 1.1.23 version
- compiled for 4.1.0 - from Tim Robert's website showed approximately
the same results.)

Now I became curious and downloaded and tried the driver from the S3
webpage instead. This one was compiled for Xfree86 4.0.3 but it worked
- or at least it seemed to. The output of /proc/mtrr looked much
better when using this server:

  edi@bird:~> cat /proc/mtrr 
  reg00: base=0x00000000 (   0MB), size= 512MB: write-back, count=1
  reg01: base=0x20000000 ( 512MB), size= 256MB: write-back, count=1
  reg02: base=0xe8000000 (3712MB), size=  16MB: write-combining, count=1

i.e. one range which has exactly the size of the video RAM.

Now my question to those of you who know more about this than I do:
Should I care about this? Is the X server from 4.2.0 buggy or
sub-optimal in this case? Or is this a non-issue? (As I said, I'm not
really interested in DVD playback. I also don't play any games.)

Thanks in advance,
Edi.

PS: Please do NOT use the S3 4.0.3 driver with Xfree86 4.2.0 if you
    care about your system. I have a reproduceable test case in which
    the S3 server crashes the whole OS while watching a webpage with
    Mozilla. The 'native' 4.2.0 server behaves fine, though.

PPS: I ran my tests with Gentoo Linux 1.1a and a 2.4.19 kernel that I
     had built myself. I double-checked with the stock SuSE 8.0 kernel and
     got the same MTRR results, though.

----- The Linux ThinkPad mailing list -----
The linux-thinkpad mailing list home page is at:
http://www.bm-soft.com/~bm/tp_mailing.html