Skip to contentSkip to conversation

2.4.4 kernel reports wrong amount of physical memory

DISCUSSION Jeff Golds 8 participants 15 messages May 14, 2001 – May 15, 2001 Documentation

lore
Share & tools
lore

Jeff Golds

author
#0 lore raw

Hi folks,

I installed the 2.4.4 kernel on a dual P3-733 system with 1 GB of ECC RAM and found that /proc/meminfo reports back only 899MB of RAM. The 2.4.2 kernel (with RedHat patches from the 7.1 release) worked fine as did the 2.4.0 kernel (with RedHat patches from the 7.0 release).

Anyone know what is going on with 2.4.4? At POST, the BIOS reports 1024MB.

-Jeff

Signature · 2 lines
Jeff Golds
[email protected]
#1 lore raw
Quoted 1 line

I installed the 2.4.4 kernel on a dual P3-733 system with 1 GB of ECC RAM and found that /proc/meminfo reports back only 899MB of RAM. The 2.4.2 kernel (with RedHat patches from the 7.1 release) worked fine as did the 2.4.0 kernel (with RedHat patches from the 7.0 release).#

Built it with 4GB support. 1Gb actually works out at about 900Mb and possibly wants renaming..

#2 lore raw
In reply to Jeff Golds
Quoted 5 lines · Jeff Golds

I installed the 2.4.4 kernel on a dual P3-733 system with 1 GB of ECC RAM and found that /proc/meminfo reports back only 899MB of RAM.

Anyone know what is going on with 2.4.4?

-EUSER (User Error)

You need to compile highmem support into the kernel if you want to use more than 890 MB of RAM, set it to maximum 4GB for best performance...

regards,

Rik
--
Linux MM bugzilla: http://linux-mm.org/bugzilla.shtml

Virtual memory is like a game you can't win; However, without VM there's truly nothing to lose...

		http://www.surriel.com/

http://www.conectiva.com/ http://distro.conectiva.com/

#3 lore raw
Quoted 3 lines · you

You need to compile highmem support into the kernel if you want to use more than 890 MB of RAM, set it to maximum 4GB for best performance...

On a similar note, what is the maximum physical memory supported by the 4GB option?

Cheers, Wayne

#4 lore raw
Quoted 8 lines · Wayne Whitney
Quoted 3 lines · you

You need to compile highmem support into the kernel if you want to use more than 890 MB of RAM, set it to maximum 4GB for best performance...

On a similar note, what is the maximum physical memory supported by the 4GB option?

Ummm, 4GB maybe? ;)

Rik
--
Linux MM bugzilla: http://linux-mm.org/bugzilla.shtml

Virtual memory is like a game you can't win; However, without VM there's truly nothing to lose...

		http://www.surriel.com/

http://www.conectiva.com/ http://distro.conectiva.com/

author
#5 lore raw
Quoted 8 lines · Rik van Riel
Quoted 6 lines · Wayne Whitney
Quoted 3 lines · you

You need to compile highmem support into the kernel if you want to use more than 890 MB of RAM, set it to maximum 4GB for best performance...

Quoted 6 lines
Quoted 2 lines

On a similar note, what is the maximum physical memory supported by the 4GB option?

Ummm, 4GB maybe? ;)

Rik

Ahh, it's totally obvious. 1 GB option = 890 MB, 4 GB option = 4GB. Can I assume a linear relation and get 66.2 MB when I select the 64 MB option?

;)

-Jeff

Signature · 2 lines
Jeff Golds
[email protected]
#6 lore raw
Quoted 3 lines · Jeff Golds

Ahh, it's totally obvious. 1 GB option = 890 MB, 4 GB option = 4GB. Can I assume a linear relation and get 66.2 MB when I select the 64 MB option?

Where did you get the mythical "1GB" option?

Last I looked we had "off", "4GB" and "64GB" ;)

cheers,

Rik
--
Linux MM bugzilla: http://linux-mm.org/bugzilla.shtml

Virtual memory is like a game you can't win; However, without VM there's truly nothing to lose...

		http://www.surriel.com/

http://www.conectiva.com/ http://distro.conectiva.com/

#7 lore raw
Quoted 3 lines · Rik van Riel

Where did you get the mythical "1GB" option?

Last I looked we had "off", "4GB" and "64GB" ;)

We do .. under 2.4.x

In 2.2.x we have 1 Gb and 2 GB ... 2.2.19 at least

Signature · 8 lines
=====================================================================
Mohammad A. Haque                              http://www.haque.net/ 
                                               [email protected]

  "Alcohol and calculus don't mix.             Project Lead
   Don't drink and derive." --Unknown          http://wm.themes.org/
                                               [email protected]
=====================================================================
author
#8 lore raw
In reply to Rik van Riel
Quoted 11 lines · Rik van Riel
Quoted 3 lines · Jeff Golds

Ahh, it's totally obvious. 1 GB option = 890 MB, 4 GB option = 4GB. Can I assume a linear relation and get 66.2 MB when I select the 64 MB option?

Where did you get the mythical "1GB" option?

Last I looked we had "off", "4GB" and "64GB" ;)

Good try, except:

If you are compiling a kernel which will never run on a machine with more than 1 Gigabyte total physical RAM, answer "off" here (default choice and suitable for most users). This will result in a "3GB/1GB"
split: 3GB are mapped so that each process sees a 3GB virtual memory space and the remaining part of the 4GB virtual memory space is used by the kernel to permanently map as much physical memory as possible.

If the machine has between 1 and 4 Gigabytes physical RAM, then answer "4GB" here.

1 GB is not more than 1 GB so "off" is the correct choice, according to the docs.

Oh I get it NOW. "Off" means the docs are just plain "off".

-Jeff

Signature · 2 lines
Jeff Golds
[email protected]
#9 lore raw
Quoted 1 line · Jeff Golds

Oh I get it NOW. "Off" means the docs are just plain "off".

It is ... "off" means we do 1GB-128MB = 896MB of memory. It would be cool if one of you two could update the docs ;)

regards,

Rik
--
Virtual memory is like a game you can't win; However, without VM there's truly nothing to lose...

http://www.surriel.com/ http://distro.conectiva.com/

Send all your spam to [email protected] (spam digging piggy)

#10 lore raw
Quoted 1 line · Rik van Riel

It would be cool if one of you two could update the docs ;)

OK, here is my attempt, as a patch to Configure.help in 2.4.5-pre1. I hope it is clear, accurate, and not too long-winded, and that my mailer does not munge patches.

Cheers,
Wayne

Documentation/Configure.help renamed from Documentation/Configure.help.orig +25 -24
@@ -198,38 +198,39 @@
 
 High Memory support
 CONFIG_NOHIGHMEM
-  Linux can use up to 64 Gigabytes of physical memory on x86 systems.
-  However, the address space of 32-bit x86 processors is only 4
-  Gigabytes large. That means that, if you have a large amount of
-  physical memory, not all of it can be "permanently mapped" by the
-  kernel. The physical memory that's not permanently mapped is called
-  "high memory".
+  Linux can use up to 64GB (64 Gigabytes) of physical memory on x86
+  systems. However, the address space of 32-bit x86 processors is only
+  4GB large. As Linux allocates 3GB of this address space to user
+  space, and the kernel reserves 128MB of address space for its needs,
+  only 896MB of address space is available for mapping physical
+  memory. This Configure option controls how the kernel uses this
+  896MB window to access physical memory.
 
-  If you are compiling a kernel which will never run on a machine with
-  more than 1 Gigabyte total physical RAM, answer "off" here (default
-  choice and suitable for most users). This will result in a "3GB/1GB"
-  split: 3GB are mapped so that each process sees a 3GB virtual memory
-  space and the remaining part of the 4GB virtual memory space is used
-  by the kernel to permanently map as much physical memory as
-  possible.
+  The default choice, "off", causes the kernel to permanently map
+  physical memory into this 896MB window. The kernel will be able
+  to use at most 896MB of physical memory, but this is fine for most
+  users.
 
-  If the machine has between 1 and 4 Gigabytes physical RAM, then
-  answer "4GB" here.
+  The "4GB" option allows the kernel to access up to 4GB of physical
+  memory.  This is done by dynamically mapping the physical memory
+  into the 896MB window as necessary; such dynamically mapped memory
+  is known as "high memory".
 
-  If more than 4 Gigabytes is used then answer "64GB" here. This
-  selection turns Intel PAE (Physical Address Extension) mode on.
-  PAE implements 3-level paging on IA32 processors. PAE is fully
-  supported by Linux, PAE mode is implemented on all recent Intel
-  processors (Pentium Pro and better). NOTE: If you say "64GB" here,
-  then the kernel will not boot on CPUs that don't support PAE!
+  The "64GB" option is necessary to support more than 4GB of physical
+  memory.  This selection turns Intel PAE (Physical Address Extension)
+  mode on.  PAE implements 3-level paging on IA32 processors. PAE is
+  fully supported by Linux and PAE mode is implemented on all recent
+  Intel processors (Pentium Pro and better). NOTE: If you say "64GB"
+  here, then the kernel will not boot on CPUs that don't support PAE!
 
-  The actual amount of total physical memory will either be
-  auto detected or can be forced by using a kernel command line option
+  The actual amount of total physical memory will either be auto
+  detected or can be forced by using a kernel command line option
   such as "mem=256M". (Try "man bootparam" or see the documentation of
   your boot loader (lilo or loadlin) about how to pass options to the
   kernel at boot time.)
 
-  If unsure, say "off".
+  If unsure, say "off" if you have 896MB or less of physical memory;
+  say "4GB" otherwise.
 
 Normal PC floppy disk support
 CONFIG_BLK_DEV_FD
author
#11 lore raw
In reply to Rik van Riel
Quoted 15 lines · Jeff Golds
Quoted 13 lines · Rik van Riel
Quoted 8 lines · Wayne Whitney
Quoted 3 lines · you

You need to compile highmem support into the kernel if you want to use more than 890 MB of RAM, set it to maximum 4GB for best performance...

On a similar note, what is the maximum physical memory supported by the 4GB option?

Ummm, 4GB maybe? ;)

Quoted 8 lines
Quoted 1 line

Rik

Ahh, it's totally obvious. 1 GB option = 890 MB, 4 GB option = 4GB. Can I assume a linear relation and get 66.2 MB when I select the 64 MB option?

;)

-Jeff

That's GB not MB =P

-Jeff

Signature · 2 lines
Jeff Golds
[email protected]
#12 lore raw
In reply to Wayne Whitney
Followup to:  <Pine.LNX.4.33.0105142025000.18102-100000@duckman.distro.conectiva>
By author:    Rik van Riel <[email protected]>
In newsgroup: linux.dev.kernel
Quoted 13 lines · Wayne Whitney
Quoted 8 lines
Quoted 3 lines · you

You need to compile highmem support into the kernel if you want to use more than 890 MB of RAM, set it to maximum 4GB for best performance...

On a similar note, what is the maximum physical memory supported by the 4GB option?

Ummm, 4GB maybe? ;)

It seems obvious once you know why the limits are there. The 1 GB limit (actually 1024-128 MB = 896 MB) is a software limit; the 4 GB and 64 GB limits are hardware limits and are exact.

IMO we should rename the 1 GB option!

-hpa

Signature · 3 lines
<[email protected]> at work, <[email protected]> in private!
"Unix gives you enough rope to shoot yourself in the foot."
http://www.zytor.com/~hpa/puzzle.txt
#13 lore raw
In reply to Wayne Whitney
Quoted 15 lines · H. Peter Anvin
Followup to:  <Pine.LNX.4.33.0105142025000.18102-100000@duckman.distro.conectiva>
By author:    Rik van Riel <[email protected]>
In newsgroup: linux.dev.kernel
Quoted 11 lines · Wayne Whitney
Quoted 8 lines
Quoted 3 lines · you

You need to compile highmem support into the kernel if you want to use more than 890 MB of RAM, set it to maximum 4GB for best performance...

On a similar note, what is the maximum physical memory supported by the 4GB option?

Quoted 6 lines
Quoted 2 lines

Ummm, 4GB maybe? ;)

It seems obvious once you know why the limits are there. The 1 GB limit (actually 1024-128 MB = 896 MB) is a software limit; the 4 GB and 64 GB limits are hardware limits and are exact.

Even with the 4GB and 64GB options, some physical address space has to be reserved for memory mapped I/O.

--
Brian Gerst

#14 lore raw
In reply to Wayne Whitney
Quoted 8 lines · Brian Gerst
Quoted 4 lines

It seems obvious once you know why the limits are there. The 1 GB limit (actually 1024-128 MB = 896 MB) is a software limit; the 4 GB and 64 GB limits are hardware limits and are exact.

Even with the 4GB and 64GB options, some physical address space has to be reserved for memory mapped I/O.

Oh, right. It's not just virtual address space. Geez, I'm being really dense today :)

-hpa

Signature · 3 lines
<[email protected]> at work, <[email protected]> in private!
"Unix gives you enough rope to shoot yourself in the foot."
http://www.zytor.com/~hpa/puzzle.txt