2002-12-08 03:21:20

by Brad Tilley

[permalink] [raw]
Subject: lilo append mem problem in 2.4.20

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


2002-12-08 07:58:50

by Joseph D. Wagner

[permalink] [raw]
Subject: RE: lilo append mem problem in 2.4.20

> Compaq proliant 5000 4 way Pentium Pro

You mean Quad processors? Wow!

> 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

2002-12-08 08:58:24

by Zwane Mwaikambo

[permalink] [raw]
Subject: Re: lilo append mem problem in 2.4.20

On Sat, 7 Dec 2002, rtilley wrote:

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

--- linux/arch/i386/kernel/setup.c.original Mon Jul 22 21:44:45 2002
+++ linux/arch/i386/kernel/setup.c Tue Jul 23 03:38:08 2002
@@ -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);
}
}

--
function.linuxpower.ca

2002-12-08 09:12:53

by Barry K. Nathan

[permalink] [raw]
Subject: Re: lilo append mem problem in 2.4.20

On Sun, Dec 08, 2002 at 02:06:34AM -0600, Joseph D. Wagner wrote:
> > Compaq proliant 5000 4 way Pentium Pro
>
> You mean Quad processors? Wow!
>
> > 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!

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

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

2002-12-08 10:54:54

by GertJan Spoelman

[permalink] [raw]
Subject: Re: lilo append mem problem in 2.4.20

Hi Brad,

On Sunday 08 December 2002 04:28, rtilley wrote:
> 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?
>

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

GertJan

2002-12-08 13:46:34

by Alan

[permalink] [raw]
Subject: Re: lilo append mem problem in 2.4.20

On Sun, 2002-12-08 at 11:02, GertJan Spoelman wrote:
> 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