Info regarding MTRR handling

From: Andev
Date: Thu Oct 21 2010 - 22:03:42 EST


Hi Richard,

I am having some trouble understanding the implementation of MTRR
handling in Linux.
I am trying to see the performance impact by disabling all cache. As a
first step I am
disabling MTRR.

Intially when I boot up my mtrr file is as following:

$ cat /proc/mtrr
reg00: base=0x00000000 ( 0MB), size=131072MB: write-back, count=1
reg01: base=0xcff00000 (3327MB), size= 1MB: uncachable, count=1
reg02: base=0xd0000000 (3328MB), size= 256MB: uncachable, count=1
reg03: base=0xe0000000 (3584MB), size= 512MB: uncachable, count=1
reg04: base=0x1ff0000000 (130816MB), size= 256MB: uncachable, count=1

There seems to be a discrepancy because I have 8 gb RAM in my system.

Now I run an OmpSCR benchmark
-------------------------
$ ./c_lu 800

This program is part of the OpenMP Source Code Repository (OmpSCR)

Program: ./c_lu
Description: LU reduction of a dense matrix.

Argument size 800
Argument NUMTHREADS 1

Running ...

Timer EXE_TIME 1.645332
-----------------------

So, I go ahead and disable the write-back cache as follows:

$ echo "disable=00" > /proc/mtrr
$ echo "base=0x00000000 size=0x80000000 type=uncachable" > /proc/mtrr

Now I again run the benchmark

$ ./c_lu 800

This program is part of the OpenMP Source Code Repository (OmpSCR)

Program: ./c_lu
Description: LU reduction of a dense matrix.

Argument size 800
Argument NUMTHREADS 1

Running ...
runs for a verry long time.(> 10 min)

So there is some effect of disabling MTRR.
Again when I enable the MTRR, I am not able to restore to intial state.

$ echo "disable=00" > /proc/mtrr
$ echo "base=0x00000000 size=0x80000000 type=write-back" > /proc/mtrr

Even after doing this, there is no speedup compared to disabling MTRR.

It will really be helpful if you could point me as to where I am wrong.

Thanks,
Andev.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/