Re: [PATCH 1/1] 2.6.14-rc3 x86: COMMAND_LINE_SIZE

Andi Kleen
2005-10-11T20:21:04Z

On Tuesday 11 October 2005 21:24, Alon Bar-Lev wrote:

> I don't understand this dependency. The cmd_line_ptr is a
> null terminated string which set by the boot loader.

Yes and limited by it and the boot protocol. And changing that CONFIG
wont' change that. IMHO this config is highly misleading.

> I think that the maximum size should be set to 1024, but
> since the kernel allocates a static buffer, users may wish
> to optimize it. So I think that a configuration option is
> the right place.

It's a bad idea to have a CONFIG for every buffer. If we go down this way
this way we end up with a unconfigurable kernel at some point with
hundreds of obscure parameters. Just increase it if there is a need for it.
If you're really worried about memory consumption you can
make the big buffer __initdata and copy it to a newly allocated buffer of the
right size.

-Andi