Dmesg: Use a PAE enabled kernel
During bootup I see
Warning only 4GB will be used.
Use a PAE enabled kernel.
But I only have 4Gb installed, so is this message wrong?
Andrew Walrond
Quoted 6 lines · Andrew Walrond
During bootup I see
Warning only 4GB will be used.
Use a PAE enabled kernel.But I only have 4Gb installed, so is this message wrong?
Yes. Its confusing 4Gb of memory with 4Gb of address space. 4Gb of RAM comes out as
[RAM][ISA][RAM....][PCI] {4GbLimit} [RAM]
Quoted 6 lines
During bootup I see
Warning only 4GB will be used.
Use a PAE enabled kernel.But I only have 4Gb installed, so is this message wrong?
Publish the dump of the e820 map you get at the start of boot. You'll probably find that the 4Gb of RAM is spread over a range of physical addresses > 4Gb in size (for a start, there's a PCI window from 3.75 to 4 Gb). If there's no other bigger holes, probably it's faster if you just let it waste that 256Mb.
M.
The dump looks like this:
BIOS-provided physical RAM map:
BIOS-e820: 0000000000000000 - 00000000000a0000 (usable)
BIOS-e820: 00000000000f0000 - 0000000000100000 (reserved)
BIOS-e820: 0000000000100000 - 00000000bfffa000 (usable)
BIOS-e820: 00000000bfffa000 - 00000000bffff000 (ACPI data)
BIOS-e820: 00000000bffff000 - 00000000c0000000 (ACPI NVS)
BIOS-e820: 00000000fec00000 - 00000000fec01000 (reserved)
BIOS-e820: 00000000fee00000 - 00000000fee01000 (reserved)
BIOS-e820: 00000000ffff0000 - 0000000100000000 (reserved)
BIOS-e820: 0000000100000000 - 0000000140000000 (usable)
Warning only 4GB will be used.
Use a PAE enabled kernel.
3200MB HIGHMEM available.
896MB LOWMEM available.
So you are saying that not all the 4Gb of ram will get mapped/used (specifically, everything not marked 'usable') ?
Can you quantify the performance degredation of a PAE enabled kernel?
Andrew Walrond
Hmmm
free suggests I only have about 3Gb...
hal3 root # free -m
total used free shared buffers cached Mem: 3029 1843 1186 0 0 1696
I assume this means the hole is bigger than 256Mb? :(
Quoted 1 line · Andrew Walrond
BIOS-e820: 0000000100000000 - 0000000140000000 (usable)
This chunk wont get used
Quoted 8 lines · Alan Cox
Quoted 1 line · Andrew Walrond
BIOS-e820: 0000000100000000 - 0000000140000000 (usable)
This chunk wont get used
Ouch
That accounts for the missing Gb then. I think the warning needs to be more like "WARNING WARNING (WILL ROBINSON)! 1GB of very expensive ram won't be used unless you enable PAE!!!"
Just how slow is PAE then ?
Andrew
Quoted 3 lines · Andrew Walrond
That accounts for the missing Gb then. I think the warning needs to be more like "WARNING WARNING (WILL ROBINSON)! 1GB of very expensive ram won't be used unless you enable PAE!!!"
That would require we could detect rambus memory 8)
printk("Warning %dGb of %sram won't be used.\n", lost>>10,
rambus()?"expensive ");
But yes more seriously it would be a lot more useful and more meaningful to tell people how much ram is not being used
Quoted 1 line
Just how slow is PAE then ?
It varies, it can cost you 5-10%. The bigger hit is that most I/O devices can't reach that memory directly from PCI space so you get bounce buffer costs and more paging/vm management overhead.
How about something like the following (untested) patch?
This is against 2.5 but will probably apply with offset to 2.4.
- Roland
arch/i386/kernel/setup.c +10 -4
@@ -634,8 +634,11 @@ max_low_pfn =MAXMEM_PFN ;#ifndef CONFIG_HIGHMEM /* Maximum memory usable is what is directly addressable */ -printk (KERN_WARNING "Warning only %ldMB will be used.\n" , -MAXMEM >>20 ); +printk (KERN_WARNING "WARNING: only %ldMB can be addressed.\n" +"%ldMB of RAM is inaccessible and will not be used.\n" , +MAXMEM >>20 , +PAGE_SHIFT <20 ? (max_pfn -MAXMEM_PFN ) >> (20 -PAGE_SHIFT ) + : (max_pfn -MAXMEM_PFN ) << (PAGE_SHIFT -20 ));if (max_pfn >MAX_NONPAE_PFN )printk (KERN_WARNING "Use a PAE enabled kernel.\n" );else
@@ -644,9 +647,12 @@#else /* !CONFIG_HIGHMEM */ #ifndef CONFIG_X86_PAE if (max_pfn >MAX_NONPAE_PFN ) { - max_pfn =MAX_NONPAE_PFN ; -printk (KERN_WARNING "Warning only 4GB will be used.\n" ); +printk (KERN_WARNING "WARNING: only 4GB can be addressed.\n" +"%ldMB of RAM is inaccessible and will not be used.\n" , +PAGE_SHIFT <20 ? (max_pfn -MAX_NONPAE_PFN ) >> (20 -PAGE_SHIFT ) + : (max_pfn -MAX_NONPAE_PFN ) << (PAGE_SHIFT -20 ));printk (KERN_WARNING "Use a PAE enabled kernel.\n" ); + max_pfn =MAX_NONPAE_PFN ; }#endif /* !CONFIG_X86_PAE */ #endif /* !CONFIG_HIGHMEM */
Quoted 15 lines
BIOS-provided physical RAM map:
BIOS-e820: 0000000000000000 -00000000000a0000(usable)
BIOS-e820:00000000000f0000- 0000000000100000 (reserved)
BIOS-e820: 0000000000100000 -00000000bfffa000(usable)
BIOS-e820:00000000bfffa000-00000000bffff000(ACPI data)
BIOS-e820:00000000bffff000-00000000c0000000(ACPI NVS)
BIOS-e820:00000000fec00000-00000000fec01000(reserved)
BIOS-e820:00000000fee00000-00000000fee01000(reserved)
BIOS-e820:00000000ffff0000- 0000000100000000 (reserved)
BIOS-e820: 0000000100000000 - 0000000140000000 (usable)
Warning only 4GB will be used.
Use a PAE enabled kernel.
3200MB HIGHMEM available.
896MB LOWMEM available.
Quoted 3 lines
So you are saying that not all the 4Gb of ram will get mapped/used (specifically, everything not marked 'usable') ?
Can you quantify the performance degredation of a PAE enabled kernel?
Depends on your workload ... there's only one way to be sure, benchmark it. If you're doing heavy page replacment / setup / teardown, it'll be more expensive. As Alan has pointed out, you're loosing a quarter of your RAM ;-)
M.
Followup to: <[email protected]> By author: Andrew Walrond <[email protected]> In newsgroup: linux.dev.kernel
Quoted 13 lines
The dump looks like this:
BIOS-provided physical RAM map:
BIOS-e820: 0000000000000000 -00000000000a0000(usable)
BIOS-e820:00000000000f0000- 0000000000100000 (reserved)
BIOS-e820: 0000000000100000 -00000000bfffa000(usable)
BIOS-e820:00000000bfffa000-00000000bffff000(ACPI data)
BIOS-e820:00000000bffff000-00000000c0000000(ACPI NVS)
BIOS-e820:00000000fec00000-00000000fec01000(reserved)
BIOS-e820:00000000fee00000-00000000fee01000(reserved)
BIOS-e820:00000000ffff0000- 0000000100000000 (reserved)
BIOS-e820: 0000000100000000 - 0000000140000000 (usable)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ This memory lives above the 4GB mark.
Quoted 7 lines
Warning only 4GB will be used.
Use a PAE enabled kernel.
3200MB HIGHMEM available.
896MB LOWMEM available.So you are saying that not all the 4Gb of ram will get mapped/used (specifically, everything not marked 'usable') ?
Basically, your motherboard only allows 3 GB below the 4 GB boundary; the rest ends up above.
-hpa
Signature · 3 lines
<[email protected]> at work, <[email protected]> in private! "Unix gives you enough rope to shoot yourself in the foot." Architectures needed: cris ia64 m68k mips64 ppc ppc64 s390 s390x sh v850 x86-64