2003-03-03 15:14:19

by Andrew Walrond

[permalink] [raw]
Subject: 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


2003-03-03 15:39:46

by Alan

[permalink] [raw]
Subject: Re: Dmesg: Use a PAE enabled kernel

On Mon, 2003-03-03 at 15:23, Andrew Walrond wrote:
> 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]


2003-03-03 15:57:59

by Martin J. Bligh

[permalink] [raw]
Subject: Re: 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?

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.

2003-03-03 16:14:33

by Andrew Walrond

[permalink] [raw]
Subject: Re: Dmesg: Use a PAE enabled kernel

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


2003-03-03 16:23:46

by Andrew Walrond

[permalink] [raw]
Subject: Re: Dmesg: Use a PAE enabled kernel

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? :(

2003-03-03 16:32:52

by Alan

[permalink] [raw]
Subject: Re: Dmesg: Use a PAE enabled kernel

On Mon, 2003-03-03 at 16:24, Andrew Walrond wrote:
> BIOS-e820: 0000000100000000 - 0000000140000000 (usable)

This chunk wont get used


2003-03-03 16:29:05

by Andrew Walrond

[permalink] [raw]
Subject: Re: Dmesg: Use a PAE enabled kernel


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



2003-03-03 16:41:01

by Andrew Walrond

[permalink] [raw]
Subject: Re: Dmesg: Use a PAE enabled kernel

Alan Cox wrote:
> On Mon, 2003-03-03 at 16:24, Andrew Walrond wrote:
>
>> 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


2003-03-03 17:31:41

by Martin J. Bligh

[permalink] [raw]
Subject: Re: Dmesg: Use a PAE enabled kernel

> 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?

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.

2003-03-03 18:09:35

by Alan

[permalink] [raw]
Subject: Re: Dmesg: Use a PAE enabled kernel

On Mon, 2003-03-03 at 16:49, Andrew Walrond wrote:
> 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

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


2003-03-04 03:12:14

by H. Peter Anvin

[permalink] [raw]
Subject: Re: Dmesg: Use a PAE enabled kernel

Followup to: <[email protected]>
By author: Andrew Walrond <[email protected]>
In newsgroup: linux.dev.kernel
>
> 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.

> 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
--
<[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

2003-03-12 20:55:17

by Roland Dreier

[permalink] [raw]
Subject: [PATCH] Re: Dmesg: Use a PAE enabled kernel

How about something like the following (untested) patch?

This is against 2.5 but will probably apply with offset to 2.4.

- Roland

--- 1.71/arch/i386/kernel/setup.c Thu Feb 27 16:10:55 2003
+++ edited/arch/i386/kernel/setup.c Wed Mar 12 12:54:42 2003
@@ -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 */