[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20191210231528.853ac9e7f84f2166fd4c4047@kernel.org>
Date: Tue, 10 Dec 2019 23:15:28 +0900
From: Masami Hiramatsu <mhiramat@...nel.org>
To: Steven Rostedt <rostedt@...dmis.org>
Cc: Randy Dunlap <rdunlap@...radead.org>,
Frank Rowand <frowand.list@...il.com>,
Ingo Molnar <mingo@...hat.com>,
Namhyung Kim <namhyung@...nel.org>,
Tim Bird <Tim.Bird@...y.com>, Jiri Olsa <jolsa@...hat.com>,
Arnaldo Carvalho de Melo <acme@...nel.org>,
Tom Zanussi <tom.zanussi@...ux.intel.com>,
Rob Herring <robh+dt@...nel.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Thomas Gleixner <tglx@...utronix.de>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Alexey Dobriyan <adobriyan@...il.com>,
Jonathan Corbet <corbet@....net>,
Linus Torvalds <torvalds@...ux-foundation.org>,
linux-doc@...r.kernel.org, linux-fsdevel@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [RFC PATCH v4 01/22] bootconfig: Add Extra Boot Config support
On Mon, 9 Dec 2019 10:54:03 -0500
Steven Rostedt <rostedt@...dmis.org> wrote:
> > > > +config BOOT_CONFIG
> > > > + bool "Boot config support"
> > > > + select LIBXBC
> > > > + default y
> > >
> > > questionable "default y".
> > > That needs lots of justification.
> >
> > OK, I can make it 'n' by default.
> >
> > I thought that was OK because most of the memories for the
> > bootconfig support were released after initialization.
> > If user doesn't pass the bootconfig, only the code for
> > /proc/bootconfig remains on runtime memory.
>
> As 'n' is usually the default, I will argue this should be 'y'!
>
> This is not some new fancy feature, or device that Linus
> complains about "my X is important!". I will say this X *is* important!
> This will (I hope) become standard in all kernel configs. One could even
> argue that there shouldn't even be a config for this at all (forced
> 'y'). This would hurt more not to have than to have. I would hate to
> try to load special options only to find out that the kernel was
> compiled with default configs and this wasn't enabled.
>
> This is extended boot config support that can be useful for most
> developers. The only ones that should say 'n' are those that are
> working to get a "tiny" kernel at boot up. As Masami said, the memory
> is freed after init, thus this should not be an issue for 99.9% of
> kernel users.
Thanks Steve!
Yes, for the users point of view, it is hard to notice that their kernel
can accept the boot config or not before boot.
To provide consistent system usability, I think it is better to be enabled
by default. Anyway, if there is no boot config, almost all buffers and
code are released after init (except for /proc/bootconfig entry point,
which will return an empty buffer).
It will increase the binary image size, but it must be small.
FYI, here is an example of vmlinux (non compressed image)
text data bss dec hex filename
16178353 5843418 13324364 35346135 21b56d7 vmlinux
16183993 5855858 13316172 35356023 21b7d77 vmlinux.xbc
16187248 5855870 13307980 35351098 21b6a3a vmlinux.xbc.btt
So, for the extra boot config support, it will increase ~6KB code and
12KB data, the boot time tracing increase ~3KB code and 12bytes data
in binary file.
Thank you,
--
Masami Hiramatsu <mhiramat@...nel.org>
Powered by blists - more mailing lists