[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <ef95923f-56b6-b4f1-94a2-555f7df32629@linux.vnet.ibm.com>
Date: Fri, 5 Aug 2016 00:23:26 +0530
From: Hari Bathini <hbathini@...ux.vnet.ibm.com>
To: Michael Ellerman <mpe@...erman.id.au>, rusty@...tcorp.com.au,
ebiederm@...ssion.com, vgoyal@...hat.com,
linuxppc-dev <linuxppc-dev@...abs.org>
Cc: Mahesh J Salgaonkar <mahesh@...ux.vnet.ibm.com>,
kexec@...ts.infradead.org, lkml <linux-kernel@...r.kernel.org>,
Ananth N Mavinakayanahalli <ananth@...ibm.com>
Subject: Re: [RESEND][PATCH v2 2/2] powerpc/fadump: parse fadump reserve
memory size based on memory range
On Thursday 04 August 2016 03:15 PM, Michael Ellerman wrote:
> Hari Bathini <hbathini@...ux.vnet.ibm.com> writes:
> ...
>> /**
>> * fadump_calculate_reserve_size(): reserve variable boot area 5% of System RAM
>> *
>> @@ -212,12 +262,17 @@ static inline unsigned long fadump_calculate_reserve_size(void)
>> {
>> unsigned long size;
>>
>> + /* sets fw_dump.reserve_bootvar */
>> + parse_fadump_reserve_mem();
>> +
>> /*
>> * Check if the size is specified through fadump_reserve_mem= cmdline
>> * option. If yes, then use that.
>> */
>> if (fw_dump.reserve_bootvar)
>> return fw_dump.reserve_bootvar;
>> + else
>> + printk(KERN_INFO "fadump: calculating default boot size\n");
>>
>> /* divide by 20 to get 5% of value */
>> size = memblock_end_of_DRAM() / 20;
> The code already knows how to reserve 5% based on the size of the machine's
> memory, as long as no commandline parameter is passed. So why can't we
> just use that logic?
Hi Michael,
That is the default value reserved but not a good enough value for
every case. It is a bit difficult to come up with a robust formula
that works for every case as new kernel changes could make the
values obsolete. But it won't be all that difficult to find values that
work for different memory ranges for a given kernel version.
Passing that as range based input with "fadump_reserve_mem"
parameter would work for every memory configuration on a
given system, which is what this patch is trying to provide..
Thanks
Hari
> cheers
>
Powered by blists - more mailing lists