Re: [PATCH] x86: mtrr_cleanup hole size should be less than half of chunk_size v2

From: Yinghai Lu
Date: Sun Sep 28 2008 - 05:11:01 EST


On Sun, Sep 28, 2008 at 12:13 AM, Ingo Molnar <mingo@xxxxxxx> wrote:
>
> * Yinghai Lu <yinghai@xxxxxxxxxx> wrote:
>
>> On Sat, Sep 27, 2008 at 8:26 PM, Yinghai Lu <yhlu.kernel@xxxxxxxxx> wrote:
>> > v2: should check with half of range0 size instead of chunk_size
>> >
>> > So don't have silly big hole.
>> >
>> > in hpa's case we could auto detect instead of adding mtrr_chunk_size in command line
>> >
>> > Ingo, please consider to squash this one to previous one
>> > | commit 2313c2793d290a8cc37c428f8622c53f3fe1d6dc
>> > | Author: Yinghai Lu <yhlu.kernel@xxxxxxxxx>
>> > | Date: Sat Sep 27 00:30:08 2008 -0700
>> > |
>> > | x86: mtrr_cleanup optimization, v2
>> >
>> > Signed-off-by: Yinghai Lu <yhlu.kernel@xxxxxxxxx>
>> >
>>
>> Dylan,
>>
>> please try tip/master after Ingo put this patch into it...
>
> applied to tip/x86/mtrr, thanks Yinghai! I've also propagated it to
> tip/master and pushed it out, so Dylan could do a one-stop testing of
> tip/master.

Gabriel, can you check tip/mater too?
http://people.redhat.com/mingo/tip.git/readme.txt

from
reg00: base=0xd0000000 (3328MB), size= 256MB: uncachable, count=1
reg01: base=0xe0000000 (3584MB), size= 512MB: uncachable, count=1
reg02: base=0x00000000 ( 0MB), size=4096MB: write-back, count=1
reg03: base=0x100000000 (4096MB), size= 512MB: write-back, count=1
reg04: base=0x120000000 (4608MB), size= 128MB: write-back, count=1
reg05: base=0x128000000 (4736MB), size= 64MB: write-back, count=1
reg06: base=0xcf600000 (3318MB), size= 2MB: uncachable, count=1

you should get
Found optimal setting for mtrr clean up
gran_size: 1M chunk_size: 16M num_reg: 7 lose RAM: 0M
range0: 0000000000000000 - 00000000d0000000
Setting variable MTRR 0, base: 0MB, range: 2048MB, type WB
Setting variable MTRR 1, base: 2048MB, range: 1024MB, type WB
Setting variable MTRR 2, base: 3072MB, range: 256MB, type WB
hole: 00000000cf600000 - 00000000cf800000
Setting variable MTRR 3, base: 3318MB, range: 2MB, type UC
rangeX: 0000000100000000 - 000000012c000000
Setting variable MTRR 4, base: 4096MB, range: 512MB, type WB
Setting variable MTRR 5, base: 4608MB, range: 128MB, type WB
Setting variable MTRR 6, base: 4736MB, range: 64MB, type WB

instead of

reg00: base=0x00000000 ( 0MB), size=2048MB: write-back, count=1
reg01: base=0x80000000 (2048MB), size=1024MB: write-back, count=1
reg02: base=0xc0000000 (3072MB), size= 256MB: write-back, count=1
reg03: base=0xcfe00000 (3326MB), size= 2MB: uncachable, count=1
reg04: base=0x100000000 (4096MB), size= 512MB: write-back, count=1
reg05: base=0x120000000 (4608MB), size= 256MB: write-back, count=1
reg06: base=0x12c000000 (4800MB), size= 64MB: uncachable, count=1

YH
--
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/