MTRR performance gains are impressive but hard to achieve

While playing with linux kernel boot parameters like

enable_mtrr_cleanup , mtrr_spare_reg_nr , mtrr_gran_size , mtrr_chunk_size

I’ve noticed impressive performance gains, at least using gtkperf. Scores started at 5.22 and dropped to 3.40 though not very stable at this time. At this point i had to disable hardware acceleration in every browser tested for flash-playback.

After google’ing quiet a bit on the subject i get to understand MTRR is now replaced with PAT , Since this was so suggested I’ve set the module option in the nvidia modules .conf file.

options nvidia NVreg_UsePageAttributeTable=1

The above rewrites UsePageAttributeTable: 4294967295 like UsePageAttributeTable: 1 which i assume is of little use, as i’ve noticed x86 PAT enabled in the dmesg output.

Though i’ve tried many settings i cannot tweak the MTRR to work reliable AND as fast as I’ve seen is achievable.

Here’s the output for my card’s memory adressing

01:00.0 VGA compatible controller: NVIDIA Corporation G86M [Quadro FX 360M] (rev a1) (prog-if 00 [VGA controller])
Subsystem: Dell Device 01ff
Flags: bus master, fast devsel, latency 0, IRQ 48
Memory at f5000000 (32-bit, non-prefetchable)
Memory at e0000000 (64-bit, prefetchable)
Memory at f2000000 (64-bit, non-prefetchable)
I/O ports at ef00
[virtual] Expansion ROM at f4000000 [disabled]
Capabilities: [60] Power Management version 2
Capabilities: [68] MSI: Enable+ Count=1/1 Maskable- 64bit+
Capabilities: [78] Express Endpoint, MSI 00

here’s how the mtrr looks like with current boot parameters, at this point i do not influence the mtrr outside of boot parameters

reg00: base=0x000000000 ( 0MB), size= 4096MB, count=1: write-back
reg01: base=0x0dff00000 ( 3583MB), size= 1MB, count=1: uncachable
reg02: base=0x0e0000000 ( 3584MB), size= 512MB, count=1: uncachable
reg03: base=0x100000000 ( 4096MB), size= 512MB, count=1: write-back

and here’s the MTRR tweak i wrote down in /etc/rc.local, these are disabled at this point

echo “base=0xf5000000 size=0x1000000 type=write-back” > /proc/mtrr
echo “base=0xf2000000 size=0x2000000 type=write-back” > /proc/mtrr
echo “base=0xe0000000 size=0x10000000 type=write-combining” > /proc/mtrr

My question is if anyone can assist me in documenting how to write down, detect and validate useful mtrr performance tweaks.

I see there are 2 replies but none appear in this forum, feel free to PM me with your remarks or requests.

So far i’ve found setting mtrr_spare_reg_nr=n is optional, for this particular system it only triggers mtrr to work well upto value 4. I do no longer set mtrr_gran_size , mtrr_chunk_size at this time. Even now i’ve seen gtkperf scores of <4 but just once.

Probably spammers who had their messages deleted.