LWN.net Logo

Dynamic kernel command-line - Resend please ignore last

From:  Alon Bar-Lev <alon.barlev@gmail.com>
To:  Alon Bar-Lev <alon.barlev@gmail.com>, Andi Kleen <ak@suse.de>, Matt Domsch <Matt_Domsch@dell.com>, Andrew Morton <akpm@osdl.org>, linux-kernel@vger.kernel.org, johninsd@san.rr.com, davej@codemonkey.org.uk, Riley@williams.name, trini@kernel.crashing.org, davem@davemloft.net, ecd@brainaid.de, jj@sunsite.ms.mff.cuni.cz, anton@samba.org, wli@holomorphy.com, lethal@linux-sh.org, lethal@linux-sh.org, rc@rc0.org.uk, spyro@f2s.com, spyro@f2s.com, rth@twiddle.net, avr32@atmel.com, hskinnemoen@atmel.com, starvik@axis.com, ralf@linux-mips.org, matthew@wil.cx, grundler@parisc-linux.org, geert@linux-m68k.org, zippel@linux-m68k.org, paulus@samba.org, schwidefsky@de.ibm.com, heiko.carstens@de.ibm.com, uclinux-v850@lsi.nec.co.jp, chris@zankel.net
Subject:  [PATCH 00/26] Dynamic kernel command-line - Resend please ignore last
Date:  Mon, 4 Sep 2006 01:15:21 +0300
Archive-link:  Article, Thread


Current implementation stores a static command-line
buffer allocated to COMMAND_LINE_SIZE size. Most
architectures stores two copies of this buffer, one
for future reference and one for parameter parsing.

In order to allow a greater command-line size, these
buffers should be dynamically allocated or marked
as init disposable buffers, so unused memory can be
released.

This patch renames the static saved_command_line
variable into boot_command_line adding __initdata
attribute, so that it can be disposed after
initialization. This rename is required so applications
that use saved_command_line will not be affected
by this change.

It reintroduces saved_command_line as dynamically
allocated buffer to match the data in boot_command_line.

It also mark secondary command-line buffer as __initdata,
and copies it to dynamically allocated static_command_line
buffer components may hold reference to it after
initialization.

This patch is for linux-2.6.18-rc5-mm1 and is divided to
target each architecture. I could not check this in any
architecture so please forgive me if I got it wrong.

Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>

---

-- 
VGER BF report: H 0

Copyright © 2006, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds