[PATCH v3 1/2] powerpc/fadump: reduce memory consumption for capture kernel

Hari Bathini hbathini at linux.vnet.ibm.com
Wed Apr 26 22:02:44 AEST 2017



On Wednesday 26 April 2017 04:02 PM, Michael Ellerman wrote:
> Hari Bathini <hbathini at linux.vnet.ibm.com> writes:
>
>> diff --git a/arch/powerpc/kernel/fadump.c b/arch/powerpc/kernel/fadump.c
>> index 8ff0dd4..87edc7b 100644
>> --- a/arch/powerpc/kernel/fadump.c
>> +++ b/arch/powerpc/kernel/fadump.c
>> @@ -338,6 +343,36 @@ unsigned long __init arch_reserved_kernel_pages(void)
>>   	return memblock_reserved_size() / PAGE_SIZE;
>>   }
>>   
>> +static void __init parse_fadump_append_params(const char *p)
>> +{
>> +	static char fadump_cmdline[COMMAND_LINE_SIZE] __initdata;
>> +	char *token;
>> +
>> +	strlcpy(fadump_cmdline, p, COMMAND_LINE_SIZE);
>> +	token = strchr(fadump_cmdline, ',');
>> +	while (token) {
>> +		*token = ' ';
>> +		token = strchr(token, ',');
>> +	}
>> +
>> +	pr_info("enforcing additional parameters (%s) passed through "
>> +		"'fadump_append=' parameter\n", fadump_cmdline);
>> +	parse_early_options(fadump_cmdline);
> Using parse_early_options() means it only works for parameters defined
> with early_param() or __setup() doesn't it?

Yeah. Actually, is it better to change commandline from "$params 
fadump_append=nr_cpus=1,numa=off"
to "$params nr_cpus=1 numa=off" early in the boot process? That way, 
parameters like udev.children-max=2 &
systemd.unit=kdump.service may also be specified in fadump_append= 
parameter?

Thanks
Hari



More information about the Linuxppc-dev mailing list