public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* vmalloc kernel parameter
@ 2006-06-28 12:15 Rodrigo Amestica
  2006-06-28 12:33 ` Sergey Vlasov
  0 siblings, 1 reply; 5+ messages in thread
From: Rodrigo Amestica @ 2006-06-28 12:15 UTC (permalink / raw)
  To: linux-kernel; +Cc: Rodrigo Amestica

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: vmalloc kernel parameter
  2006-06-28 12:15 vmalloc kernel parameter Rodrigo Amestica
@ 2006-06-28 12:33 ` Sergey Vlasov
  2006-06-28 15:21   ` Rodrigo Amestica
  2006-06-29  2:07   ` H. Peter Anvin
  0 siblings, 2 replies; 5+ messages in thread
From: Sergey Vlasov @ 2006-06-28 12:33 UTC (permalink / raw)
  To: Rodrigo Amestica; +Cc: linux-kernel

[-- Attachment #1: Type: text/plain, Size: 1430 bytes --]

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

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

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

[-- Attachment #2: Type: application/pgp-signature, Size: 190 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: vmalloc kernel parameter
  2006-06-28 12:33 ` Sergey Vlasov
@ 2006-06-28 15:21   ` Rodrigo Amestica
  2006-06-29 13:08     ` Rodrigo Amestica
  2006-06-29  2:07   ` H. Peter Anvin
  1 sibling, 1 reply; 5+ messages in thread
From: Rodrigo Amestica @ 2006-06-28 15:21 UTC (permalink / raw)
  To: Sergey Vlasov; +Cc: linux-kernel, 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

Sergey Vlasov wrote:
> 
> 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
> 
>> 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.
> 
>>          kernel /boot/vmlinuz ro root=LABEL=/ vmalloc=256M
>>          initrd /boot/initrd.img

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: vmalloc kernel parameter
  2006-06-28 12:33 ` Sergey Vlasov
  2006-06-28 15:21   ` Rodrigo Amestica
@ 2006-06-29  2:07   ` H. Peter Anvin
  1 sibling, 0 replies; 5+ messages in thread
From: H. Peter Anvin @ 2006-06-29  2:07 UTC (permalink / raw)
  To: linux-kernel

Followup to:  <20060628163339.d2110437.vsu@altlinux.ru>
By author:    Sergey Vlasov <vsu@altlinux.ru>
In newsgroup: linux.dev.kernel
> 
> > 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?
> 
> 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


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: vmalloc kernel parameter
  2006-06-28 15:21   ` Rodrigo Amestica
@ 2006-06-29 13:08     ` Rodrigo Amestica
  0 siblings, 0 replies; 5+ messages in thread
From: Rodrigo Amestica @ 2006-06-29 13:08 UTC (permalink / raw)
  To: Sergey Vlasov; +Cc: Rodrigo Amestica, linux-kernel, Patrick P Murphy

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

Rodrigo Amestica wrote:
> 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
> 
> Sergey Vlasov wrote:
>>
>> 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
>>
>>> 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.
>>
>>>          kernel /boot/vmlinuz ro root=LABEL=/ vmalloc=256M
>>>          initrd /boot/initrd.img

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2006-06-29 13:08 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-06-28 12:15 vmalloc kernel parameter Rodrigo Amestica
2006-06-28 12:33 ` Sergey Vlasov
2006-06-28 15:21   ` Rodrigo Amestica
2006-06-29 13:08     ` Rodrigo Amestica
2006-06-29  2:07   ` H. Peter Anvin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox