public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Possible bug in initramfs RAM handling
@ 2015-01-12 16:20 Tobias Powalowski
  2015-01-21 20:38 ` Lennart Sorensen
  0 siblings, 1 reply; 2+ messages in thread
From: Tobias Powalowski @ 2015-01-12 16:20 UTC (permalink / raw)
  To: linux-kernel

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

Hi,
I have a weird bug here with initramfs,
I have big initramfs files around 150MB zipped, 400MB extracted.
I suppose the needed RAM to boot this setup should be around:
150MB zipped initramfs+ 400MB extracted initramfs + 5MB kernel image.
Our distro kernel has tmpfs support, booting this setup without kernel
parameter needs around 1000MB RAM to boot.
Using rootfstype=ramfs makes it work with around 600MB RAM.

Is this a bug in kernel code?
Shouldn't both types not use the same amount of RAM?
I used kernel 3.18.2 at the moment but issue is reproducable with 3.15 too.

Thanks for your help.
greetings
tpowa

-- 
Tobias Powalowski
Archlinux Developer & Package Maintainer (tpowa)
http://www.archlinux.org
tpowa@archlinux.org





[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

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

* Re: Possible bug in initramfs RAM handling
  2015-01-12 16:20 Possible bug in initramfs RAM handling Tobias Powalowski
@ 2015-01-21 20:38 ` Lennart Sorensen
  0 siblings, 0 replies; 2+ messages in thread
From: Lennart Sorensen @ 2015-01-21 20:38 UTC (permalink / raw)
  To: Tobias Powalowski; +Cc: linux-kernel

On Mon, Jan 12, 2015 at 05:20:31PM +0100, Tobias Powalowski wrote:
> I have a weird bug here with initramfs,
> I have big initramfs files around 150MB zipped, 400MB extracted.
> I suppose the needed RAM to boot this setup should be around:
> 150MB zipped initramfs+ 400MB extracted initramfs + 5MB kernel image.
> Our distro kernel has tmpfs support, booting this setup without kernel
> parameter needs around 1000MB RAM to boot.
> Using rootfstype=ramfs makes it work with around 600MB RAM.
> 
> Is this a bug in kernel code?
> Shouldn't both types not use the same amount of RAM?
> I used kernel 3.18.2 at the moment but issue is reproducable with 3.15 too.

tmpfs defaults to size=50%, meaning it can not use more than half the
ram in the system.  Could that be your problem?

After all if the extracted size is 400MB, and tmpfs limit is 50% of ram,
that alone means it must have at least 800MB of ram to allow extracting
to tmpfs.  Add in the 150MB compressed size and you are close to your
1000MB value.  ramfs probably has no such limit and hence you can get
by with 600MB.

Maybe 'rootflags=size=90%' or something like that would help.
Not entirely sure if that is the correct syntax.

-- 
Len Sorensen

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

end of thread, other threads:[~2015-01-21 20:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-12 16:20 Possible bug in initramfs RAM handling Tobias Powalowski
2015-01-21 20:38 ` Lennart Sorensen

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