On 07/30/13 at 09:23am, Vivek Goyal wrote:
On Fri, Jul 26, 2013 at 02:39:52AM +0800, WANG Chao wrote:
> 2nd kernel has very limited memory. Allocating huge pages will probably
> trigger OOM. So let's remove hugepages and hugepagesz kernel parameters
> for 2nd kernel when 1st kernel are using them.
> If user wants huge pages cmdline in 2nd kernel, he/she can still specify
> it through KERNEL_COMMANDLINE_APPEND in /etc/sysconfig/kdump.
> This patch adds a new function remove_cmdline_param(). It takes a list
> of kernel parameters as its arguments and remove them from given kernel
> 1. Add description of remove_cmdline_param() per Vivek.
> 2. Remove_cmdline_param() will take kernel cmdline as $1, then strip it
> and print the result.
> Signed-off-by: WANG Chao <chaowang(a)redhat.com>
Looks good to me.
Acked-by: Vivek Goyal <vgoyal(a)redhat.com>
It took me a while trying to understand sed expressions. Last one
to replace multiple white spaces with one seems unnecessary as
command line parser will anyway ignore multiple white spaces.
cmdline size is limited and multiple white spaces looks bad :/
regular expressions is evil, tempted and dangerous.