Re: [RFC Patch] use MTRR for write combining if PAT is not available

From: Thomas Schlichter
Date: Wed Oct 21 2009 - 16:01:54 EST


Ingo Molnar wrote:
> * Jan Beulich <JBeulich@xxxxxxxxxx> wrote:
> > I'm perfectly fine with just handling the aligned case, as long as the
> > code checks that the alignment constraints are met.
>
> It could even emit a debug warning if they are not met - that way we'll
> see how important the unaligned case is.

OK, so I think the attached patches should do it. Hopefully I have addressed
all your comments.

This series works for my test machine, without it, or without X running, I
have these MTRR entries:
reg00: base=0x000000000 ( 0MB), size= 2048MB, count=1: write-back
reg01: base=0x06ff00000 ( 1791MB), size= 1MB, count=1: uncachable
reg02: base=0x070000000 ( 1792MB), size= 256MB, count=1: uncachable

With the patches applied and X running I get these:
reg00: base=0x000000000 ( 0MB), size= 2048MB, count=1: write-back
reg01: base=0x06ff00000 ( 1791MB), size= 1MB, count=1: uncachable
reg02: base=0x070000000 ( 1792MB), size= 256MB, count=1: uncachable
reg03: base=0x0d0000000 ( 3328MB), size= 256MB, count=1: write-combining

Best regards,
Thomas