observations with git X server intel/MTRR/performance
Eric Anholt
eric at anholt.net
Thu Nov 6 09:49:55 PST 2008
On Thu, 2008-11-06 at 14:03 +0100, Tobias Hain wrote:
> Hello,
> Problem 2: MTRR not being set on intel
> ==========
>
> My stock 8.10 system adds reg03 to the MTRR regions when launching x-server
> with stock intel 2.4.2 drivers:
>
> reg00: base=0x000000000 ( 0MB), size= 2048MB, count=1: write-back
> reg01: base=0x07f800000 ( 2040MB), size= 8MB, count=1: uncachable
> reg02: base=0x07f700000 ( 2039MB), size= 1MB, count=1: uncachable
> reg03: base=0x0e0000000 ( 3584MB), size= 256MB, count=1: write-combining
>
> However if I launch the self build git x server stack reg03 is missing and
> only reg00-reg02 being set. Instead I get so error messages in dmesg such
> as:
>
> [ 209.308956] mtrr: base(0xe0000000) is not aligned on a size(0x770000)
> boundary
> [ 211.173759] mtrr: no MTRR for e0000000,770000 found
>
> And on every exit of the x session:
> waiting for X server to shut down error setting MTRR (base = 0xe0000000,
> size = 0x10000000, type = 1) Invalid argument (22)
>
> and dmesg gets
> mtrr: no MTRR for e0000000,10000000 found
>
> The intel driver tries to delete the MTRR, but for some reason it failed to
> set it up when launching the X driver. Xorg.0.log doesn't reveal anything
> suspicious. It does that behaviour with a PAT kernel as well as the old
> fashioned MTRR kernel.
>
> Again: I can fix that manually by writing the appropriate data to
> /proc/mtrr. But how to properly fix that? Who exactly is supposed to set up
> the MTRR registers? libdrm_intel.so? intel_drv.so? Can't be a privilege
> problem sind Xorg is owned by root and +s bit set (see above). Which
> interface does the intel component use to set the mtrr? A kernel API or
> /proc/mtrr?
Getting working MTRRs has been getting harder and harder over time. So
we're trying to make things work without them.
Things that use libpciaccess (the X Server) should be getting correct wc
mappings thanks to using the resource_wc sysfs file. If you update your
kernel, the kernel also gets wc mappings using the new io_map_atomic
interfaces. So at that point, the MTRR shouldn't be necessary.
--
Eric Anholt
eric at anholt.net eric.anholt at intel.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part
URL: <http://lists.x.org/archives/xorg/attachments/20081106/64548c8f/attachment.pgp>
More information about the xorg
mailing list