Re: [PATCH] trim memory not covered by WB MTRRs

From: Justin Piszcz
Date: Wed Jun 06 2007 - 18:07:45 EST




On Wed, 6 Jun 2007, Jesse Barnes wrote:

On Wednesday, June 6, 2007 3:03 pm Justin Piszcz wrote:
Mem: 8039620k total, 7936472k used, 103148k free, 708k
buffers Mem: 8039608k total, 969380k used, 7070228k free,
1232k buffers

I am curious, why does the patch != the mem=8832M?

I'm not sure... can you post your e820 map from boot and the contents
of /proc/mtrr? Maybe my patch is trimming off a few too many pages, or
maybe 8832M isn't quite right and actually ends up leaving you with a
few uncached pages.

Jesse


I cannot post the E820 memory map, I have no way to capture it, I cannot get anything from netconsole and dmesg does not show it either.

BEFORE:
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=0xcf800000 (3320MB), size= 8MB: uncachable, count=1
reg04: base=0xcf700000 (3319MB), size= 1MB: uncachable, count=1
reg05: base=0x100000000 (4096MB), size=4096MB: write-back, count=1
reg06: base=0x200000000 (8192MB), size= 512MB: write-back, count=1
reg07: base=0x220000000 (8704MB), size= 128MB: write-back, count=1

AFTER:
$ cat /proc/mtrr
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=0xcf800000 (3320MB), size= 8MB: uncachable, count=1
reg04: base=0xcf700000 (3319MB), size= 1MB: uncachable, count=1
reg05: base=0x100000000 (4096MB), size=4096MB: write-back, count=1
reg06: base=0x200000000 (8192MB), size= 512MB: write-back, count=1
reg07: base=0x220000000 (8704MB), size= 128MB: write-back, count=1

But that still works.

Justin.
-
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/