Skip to contentSkip to conversation

vmalloc kernel parameter

DISCUSSION Rodrigo Amestica 3 participants 5 messages Jun 28, 2006 – Jun 29, 2006

lore
Share & tools
lore
#0 lore raw

Hi, I'm having troubles when using the vmalloc kernel parameter.

My grub config looks as shown below. If I set vmalloc to anything bigger than 128M (the default) then the kernel will not boot and it will log the following on the console:

VFS: Cannot open root device "LABEL=/" or unknown-block(0,0) Please append a correct "root=" boot option
Kernel Panic - not syncing: VFS Unable to mount root fs on unknown-block(0,0)

If I specify 128M or less then the kernel will boot just fine and /proc/meminfo will show the effect in VmallocTotal.

Any hint on what I'm crashing with?

thanks,
Rodrigo

ps: my kernel version is 2.6.15.2, and my machine is a dual opteron with 2GB of ram

title with vmalloc
root (hd0,0)
kernel /boot/vmlinuz ro root=LABEL=/ vmalloc=256M initrd /boot/initrd.img

#1 lore raw
Quoted 11 lines · On Wed, 28 Jun 2006 08:15:06 -0400 Rodrigo Amestica wrote:

Hi, I'm having troubles when using the vmalloc kernel parameter.

My grub config looks as shown below. If I set vmalloc to anything bigger than 128M (the default) then the kernel will not boot and it will log the following on the console:

VFS: Cannot open root device "LABEL=/" or unknown-block(0,0) Please append a correct "root=" boot option
Kernel Panic - not syncing: VFS Unable to mount root fs on unknown-block(0,0)

Quoted 4 lines

If I specify 128M or less then the kernel will boot just fine and /proc/meminfo will show the effect in VmallocTotal.

Any hint on what I'm crashing with?

This is a known problem with GRUB: it tries to put initrd at the highest possible address in memory, and assumes the standard vmalloc area size. You need to trick GRUB into thinking that your machine has less memory by using "uppermem 524288" (512M) or even lower - then the initrd data will still be accessible for the kernel even with larger vmalloc area.

http://lkml.org/lkml/2005/4/4/283
http://lists.linbit.com/pipermail/drbd-user/2005-April/002890.html

Quoted 5 lines

ps: my kernel version is 2.6.15.2, and my machine is a dual opteron with 2GB of ram

title with vmalloc

         root (hd0,0)

Add "uppermem 524288" here.

Quoted 2 lines

kernel /boot/vmlinuz ro root=LABEL=/ vmalloc=256M initrd /boot/initrd.img

#2 lore raw

Hi Sergey, many thanks for the reply.

I saw those links before but I did not get their full meaning.

By setting uppermem to 512M it does actually work. However, now I'm trying to reserve RAM for DMA sake. For that I use mem=1899M; where 1899 comes from the total memory reported under normal booting less 128M, which are the Megs that I'm trying to reserve.

It seems that by adding mem to the boot line goes into conflicting with the uppermem+vmalloc arrangement.

Without providing more details on what's actually happening can you tell that there is something wrong on what I'm trying to do?

Would switching to lilo help any?

thanks,
Rodrigo

Quoted 20 lines · Sergey Vlasov

This is a known problem with GRUB: it tries to put initrd at the highest possible address in memory, and assumes the standard vmalloc area size. You need to trick GRUB into thinking that your machine has less memory by using "uppermem 524288" (512M) or even lower - then the initrd data will still be accessible for the kernel even with larger vmalloc area.

http://lkml.org/lkml/2005/4/4/283
http://lists.linbit.com/pipermail/drbd-user/2005-April/002890.html

Quoted 5 lines

ps: my kernel version is 2.6.15.2, and my machine is a dual opteron with 2GB of ram

title with vmalloc

         root (hd0,0)

Add "uppermem 524288" here.

Quoted 2 lines

kernel /boot/vmlinuz ro root=LABEL=/ vmalloc=256M initrd /boot/initrd.img

#3 lore raw

Hi Sergey,

the uppermem workaround for grub did not work well for me when I tried to add the mem+memmap parameters to the kernel. My machine has 2GB of ram and trying to set mem beyond the 1GB limit made the machine unable to boot. Setting mem to a value below 1GB allowed the machine to boot but VmallocTotal reported unexpected values.

I have switched now to lilo and things seems to work just fine. The following lilo config

image=/boot/vmlinuz

        label=vmalloc
        initrd=/boot/initrd.img
        read-only
        append="root=LABEL=/ vmalloc=256M mem=1899M memmap=128M#1899M"

let's the machine boot just fine reporting the following values in /proc/meminfo

MemTotal:      1925632 kB
VmallocTotal:   245752 kB

Rodrigo

Quoted 36 lines · Rodrigo Amestica

Hi Sergey, many thanks for the reply.

I saw those links before but I did not get their full meaning.

By setting uppermem to 512M it does actually work. However, now I'm trying to reserve RAM for DMA sake. For that I use mem=1899M; where 1899 comes from the total memory reported under normal booting less 128M, which are the Megs that I'm trying to reserve.

It seems that by adding mem to the boot line goes into conflicting with the uppermem+vmalloc arrangement.

Without providing more details on what's actually happening can you tell that there is something wrong on what I'm trying to do?

Would switching to lilo help any?

thanks,
Rodrigo

Quoted 20 lines · Sergey Vlasov

This is a known problem with GRUB: it tries to put initrd at the highest possible address in memory, and assumes the standard vmalloc area size. You need to trick GRUB into thinking that your machine has less memory by using "uppermem 524288" (512M) or even lower - then the initrd data will still be accessible for the kernel even with larger vmalloc area.

http://lkml.org/lkml/2005/4/4/283
http://lists.linbit.com/pipermail/drbd-user/2005-April/002890.html

Quoted 5 lines

ps: my kernel version is 2.6.15.2, and my machine is a dual opteron with 2GB of ram

title with vmalloc

         root (hd0,0)

Add "uppermem 524288" here.

Quoted 2 lines

kernel /boot/vmlinuz ro root=LABEL=/ vmalloc=256M initrd /boot/initrd.img

#4 lore raw
In reply to Sergey Vlasov
Followup to:  <[email protected]>
By author:    Sergey Vlasov <[email protected]>
In newsgroup: linux.dev.kernel
Quoted 15 lines
Quoted 15 lines

Hi, I'm having troubles when using the vmalloc kernel parameter.

My grub config looks as shown below. If I set vmalloc to anything bigger than 128M (the default) then the kernel will not boot and it will log the following on the console:

VFS: Cannot open root device "LABEL=/" or unknown-block(0,0) Please append a correct "root=" boot option
Kernel Panic - not syncing: VFS Unable to mount root fs on unknown-block(0,0)

If I specify 128M or less then the kernel will boot just fine and /proc/meminfo will show the effect in VmallocTotal.

Quoted 8 lines
Quoted 1 line

Any hint on what I'm crashing with?

This is a known problem with GRUB: it tries to put initrd at the highest possible address in memory, and assumes the standard vmalloc area size. You need to trick GRUB into thinking that your machine has less memory by using "uppermem 524288" (512M) or even lower - then the initrd data will still be accessible for the kernel even with larger vmalloc area.

Grub is just following protocol in that way. The kernel really ought to move the initrd to the spot that it wants, preferrably as early as possible in the boot. On i386, it could do it in assembly before even enabling paging; on x86-64 none of this is an issue...

-hpa