linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Hari Bathini <hbathini@linux.ibm.com>
To: Christophe Leroy <christophe.leroy@csgroup.eu>,
	Michael Ellerman <mpe@ellerman.id.au>
Cc: linuxppc-dev <linuxppc-dev@lists.ozlabs.org>,
	Mahesh J Salgaonkar <mahesh@linux.ibm.com>,
	Sourabh Jain <sourabhjain@linux.ibm.com>
Subject: Re: [PATCH] ppc64/kdump: Limit kdump base to 512MB
Date: Mon, 12 Sep 2022 12:22:50 +0530	[thread overview]
Message-ID: <3583c52c-52c1-b211-dc09-5de22472b084@linux.ibm.com> (raw)
In-Reply-To: <023c95f4-cee2-221d-0fdd-e3ab677483f6@csgroup.eu>



On 12/09/22 10:54 am, Christophe Leroy wrote:
> 
> 
> Le 09/09/2022 à 19:40, Hari Bathini a écrit :
>> Since commit e641eb03ab2b0 ("powerpc: Fix up the kdump base cap to
>> 128M") memory for kdump kernel has been reserved at an offset of
>> 128MB. This held up well for a long time before running into boot
>> failure on LPARs having a lot of cores. Commit 7c5ed82b800d8
>> ("powerpc: Set crashkernel offset to mid of RMA region") fixed this
>> boot failure by moving the offset to mid of RMA region. Limit this
>> offset to 512MB to avoid running into boot failures, during kdump
>> kernel boot, due RTAS or other allocation restrictions.
>>
>> Signed-off-by: Hari Bathini <hbathini@linux.ibm.com>
>> ---
>>    arch/powerpc/kexec/core.c | 4 ++--
>>    1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/arch/powerpc/kexec/core.c b/arch/powerpc/kexec/core.c
>> index cf84bfe9e27e..c2cbfcf81cea 100644
>> --- a/arch/powerpc/kexec/core.c
>> +++ b/arch/powerpc/kexec/core.c
>> @@ -136,7 +136,7 @@ void __init reserve_crashkernel(void)
>>    #ifdef CONFIG_PPC64
>>    		/*
>>    		 * On the LPAR platform place the crash kernel to mid of
>> -		 * RMA size (512MB or more) to ensure the crash kernel
>> +		 * RMA size (max. of 512MB) to ensure the crash kernel
>>    		 * gets enough space to place itself and some stack to be
>>    		 * in the first segment. At the same time normal kernel
>>    		 * also get enough space to allocate memory for essential
>> @@ -144,7 +144,7 @@ void __init reserve_crashkernel(void)
>>    		 * kernel starts at 128MB offset on other platforms.
>>    		 */
>>    		if (firmware_has_feature(FW_FEATURE_LPAR))
>> -			crashk_res.start = ppc64_rma_size / 2;
>> +			crashk_res.start = min(0x20000000ULL, (ppc64_rma_size / 2));
> 
> Use SZ_512M instead of open coding.
> 
> Remove the ( ) around ppc64_rma_size / 2

Thanks for the review. Posted v2 with updated changelog and
the above addressed..

- Hari

      reply	other threads:[~2022-09-12  6:53 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-09 17:40 [PATCH] ppc64/kdump: Limit kdump base to 512MB Hari Bathini
2022-09-12  5:24 ` Christophe Leroy
2022-09-12  6:52   ` Hari Bathini [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3583c52c-52c1-b211-dc09-5de22472b084@linux.ibm.com \
    --to=hbathini@linux.ibm.com \
    --cc=christophe.leroy@csgroup.eu \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mahesh@linux.ibm.com \
    --cc=mpe@ellerman.id.au \
    --cc=sourabhjain@linux.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).