Skip to contentSkip to conversation

lilo append mem problem in 2.4.20

DISCUSSION rtilley 6 participants 6 messages Dec 8, 2002

lore
Share & tools
lore

rtilley

author
#0 lore raw

Hello,

Compaq proliant 5000 4 way Pentium Pro with 1 GB RAM only uses 12 to 13 MB of RAM when I use kernel 2.4.20 with ac1 patch even when I do append="mem=1024" in /etc/lilo.conf

RH 7.2 is the distro and its default kernel (2.4.7-10smp), works flawlessly with the mem append, it sees and uses all the RAM. But, their latest kernel 2.4.18-18.7.xsmp fails to use the RAM as well; it too only sees 12 to 13 MB... this is why I tried the kernel.org kernel.

I used RH's 686-smp kernel config file to build the 2.4.20-ac1 kernel. I turned High Mem support off as I don't think 1 GB is high mem... is it? Anyone know how I can use all of the RAM?

Here's the lines from /var/log/messages for each kernel:

2.4.20smp-ac1 = Dec 4 13:44:48 localhost kernel: Memory: 12700k/16384k available (1396k kernel code, 3168k reserved, 102k data, 240k init, 0k highmem)

2.4.18-18.7.xsmp = Memory: 13156k/16384k available (1269k kernel code, 2712k reserved, 90k data, 220k init, 0k highmem)

2.4.7-10smp = Memory: 1026788k/1048576k available (1396k kernel code, 20376k reserved, 102k data, 240k init, 131072k highmem)

Thanks a bunch,

Brad

#1 lore raw
Quoted 1 line

Compaq proliant 5000 4 way Pentium Pro

You mean Quad processors? Wow!

Quoted 3 lines

I used RH's 686-smp kernel config file to build the 2.4.20-ac1 kernel. I turned High Mem support off as I don't think 1 GB is high mem... is it?

Actually, anything over 896 or so MB is considered High Mem. Don't ask me why. I didn't write the code. If I did, I would have used a nice round number.

IN OTHER WORDS, TURN HIGH MEM SUPPORT BACK ON!

Now, this part is just my guess, but try compiling the kernel for 586-smp instead of a 686-smp. IMHO, the documentation isn't really clear about exactly which processor crosses the threshold, and Intel's naming convention doesn't help either.

But I could be wrong.

Joseph Wagner

#3 lore raw
In reply to rtilley
Quoted 6 lines · rtilley

2.4.20smp-ac1 = Dec 4 13:44:48 localhost kernel: Memory: 12700k/16384k available (1396k kernel code, 3168k reserved, 102k data, 240k init, 0k highmem)

2.4.18-18.7.xsmp = Memory: 13156k/16384k available (1269k kernel code, 2712k reserved, 90k data, 220k init, 0k highmem)

I think it crept in after 2.4.18 in the -ac tree, can you test the following patch? Courtesy of JA Magallon's tree;

11-memparam.bz2
Fix mem=XXX kernel parameter when user gives a size bigger than what kernel autodetected (kill a previous change)
Author: Adrian Bunk <[email protected]>,
Leonardo Gomes Figueira <[email protected]>

arch/i386/kernel/setup.c renamed from arch/i386/kernel/setup.c.original +16 -8
@@ -770,21 +770,29 @@
 				userdef = 1;
 			} else {
 				/* If the user specifies memory size, we
-				 * limit the BIOS-provided memory map to
-				 * that size. exactmap can be used to specify
-				 * the exact map. mem=number can be used to
-				 * trim the existing memory map.
+				 * blow away any automatically generated
+				 * size
 				 */
 				unsigned long long start_at, mem_size;
 
+				if (userdef == 0) {
+					/* first time in: zap the whitelist
+					 * and reinitialize it with the
+					 * standard low-memory region.
+					 */
+					e820.nr_map = 0;
+					userdef = 1;
+					add_memory_region(0, LOWMEMSIZE(), E820_RAM);
+				}
 				mem_size = memparse(from+4, &from);
-				if (*from == '@') {
+				if (*from == '@')
 					start_at = memparse(from+1, &from);
-					add_memory_region(start_at, mem_size, E820_RAM);
-				} else {
-					limit_regions(mem_size);
+				else {
+					start_at = HIGH_MEMORY;
+					mem_size -= HIGH_MEMORY;
 					userdef=1;
 				}
+				add_memory_region(start_at, mem_size, E820_RAM);
 			}
 		}
 
Signature · 1 line
function.linuxpower.ca
#2 lore raw
In reply to Joseph D. Wagner
Quoted 8 lines · Joseph D. Wagner
Quoted 1 line

Compaq proliant 5000 4 way Pentium Pro

You mean Quad processors? Wow!

Quoted 3 lines

I used RH's 686-smp kernel config file to build the 2.4.20-ac1 kernel. I turned High Mem support off as I don't think 1 GB is high mem... is it?

Quoted 5 lines

Actually, anything over 896 or so MB is considered High Mem. Don't ask me why. I didn't write the code. If I did, I would have used a nice round number.

IN OTHER WORDS, TURN HIGH MEM SUPPORT BACK ON!

The original poster should still have access to 896MB of RAM even with highmem off. Something else is actually wrong. (I don't have any useful ideas for troubleshooting it though.)

Quoted 6 lines

Now, this part is just my guess, but try compiling the kernel for 586-smp instead of a 686-smp. IMHO, the documentation isn't really clear about exactly which processor crosses the threshold, and Intel's naming convention doesn't help either.

But I could be wrong.

You could say the difference between "586" and "686" is essentially the difference between the original Pentium and the Pentium Pro.

Thus the original Pentium, and its variant the Pentium MMX, are 586. The Pentium Pro, and its variants the Pentium II and III (and their Celeron variants too) are 686. The Pentium IV identifies itself as a 1586 (as has been mentioned on this list in the past, it's a bad pun involving roman numerals), but Linux considers that to be 686.

I hope that helps.

-Barry K. Nathan <[email protected]>

#4 lore raw
In reply to rtilley

Hi Brad,

Quoted 6 lines · rtilley

Hello,

Compaq proliant 5000 4 way Pentium Pro with 1 GB RAM only uses 12 to 13 MB of RAM when I use kernel 2.4.20 with ac1 patch even when I do append="mem=1024" in /etc/lilo.conf

Quoted 9 lines

RH 7.2 is the distro and its default kernel (2.4.7-10smp), works flawlessly with the mem append, it sees and uses all the RAM. But, their latest kernel 2.4.18-18.7.xsmp fails to use the RAM as well; it too only sees 12 to 13 MB... this is why I tried the kernel.org kernel.

I used RH's 686-smp kernel config file to build the 2.4.20-ac1 kernel. I turned High Mem support off as I don't think 1 GB is high mem... is it? Anyone know how I can use all of the RAM?

I had the same problem on an old Compaq 2500 with 320Mb memory, the following line used to work :

        append="mem=320M"
now I have to use:
        append="mem=exactmap mem=640K@0 mem=319M@1M"
to get the kernel to see all the memory.
So probably you can get it working again with:
        append="mem=exactmap mem=640K@0 mem=1023M@1M"

Maybe you also could do directly: exactmap mem=1024M@0
or 1G@0, but I haven't tried that yet.
It seems the mem parameter now only can be used to limit the amount of memory used by the kernel.

Signature · 1 line
    GertJan
#5 lore raw
Quoted 8 lines · GertJan Spoelman
        append="mem=exactmap mem=640K@0 mem=319M@1M"
to get the kernel to see all the memory.
So probably you can get it working again with:
        append="mem=exactmap mem=640K@0 mem=1023M@1M"

Maybe you also could do directly: exactmap mem=1024M@0
or 1G@0, but I haven't tried that yet.
It seems the mem parameter now only can be used to limit the amount of memory used by the kernel.

Without exactmap yes (fixed in 2.4.19 I believe). Also on many compaqs you can set the OS in the BIOS to "unixware" and get sane results