From: "Aneesh Kumar K.V" <aneesh.kumar@linux.ibm.com>
To: Sourabh Jain <sourabhjain@linux.ibm.com>, mpe@ellerman.id.au
Cc: Abdul haleem <abdhalee@linux.vnet.ibm.com>,
mahesh@linux.vnet.ibm.com, linux-kernel@vger.kernel.org,
hbathini@linux.ibm.com, linuxppc-dev@ozlabs.org
Subject: Re: [PATCH 3/3] powerpc: Set crashkernel offset to mid of RMA region
Date: Mon, 4 Oct 2021 21:36:38 +0530 [thread overview]
Message-ID: <f13e218e-4e38-4076-672f-d555d7abfc02@linux.ibm.com> (raw)
In-Reply-To: <20211004151142.256251-4-sourabhjain@linux.ibm.com>
On 10/4/21 20:41, Sourabh Jain wrote:
> On large config LPARs (having 192 and more cores), Linux fails to boot
> due to insufficient memory in the first memory block. It is due to the
> reserve crashkernel area starts at 128MB offset by default and which
> doesn't leave enough space in the first memory block to accommodate
> memory for other essential system resources.
>
> Given that the RMA region size can be 512MB or more, setting the
> crashkernel offset to mid of RMA size will leave enough space to
> kernel to allocate memory for other system resources in the first
> memory block.
>
> Signed-off-by: Sourabh Jain <sourabhjain@linux.ibm.com>
> Reported-and-tested-by: Abdul haleem <abdhalee@linux.vnet.ibm.com>
> ---
> arch/powerpc/kernel/rtas.c | 3 +++
> arch/powerpc/kexec/core.c | 13 +++++++++----
> 2 files changed, 12 insertions(+), 4 deletions(-)
>
> diff --git a/arch/powerpc/kernel/rtas.c b/arch/powerpc/kernel/rtas.c
> index ff80bbad22a5..ce5e62bb4d8e 100644
> --- a/arch/powerpc/kernel/rtas.c
> +++ b/arch/powerpc/kernel/rtas.c
> @@ -1235,6 +1235,9 @@ int __init early_init_dt_scan_rtas(unsigned long node,
> entryp = of_get_flat_dt_prop(node, "linux,rtas-entry", NULL);
> sizep = of_get_flat_dt_prop(node, "rtas-size", NULL);
>
> + if (of_get_flat_dt_prop(node, "ibm,hypertas-functions", NULL))
> + powerpc_firmware_features |= FW_FEATURE_LPAR;
> +
The equivalent check that we currently do more than checking
ibm,hypertas-functions.
if (!strcmp(uname, "rtas") || !strcmp(uname, "rtas@0")) {
prop = of_get_flat_dt_prop(node, "ibm,hypertas-functions",
&len);
if (prop) {
powerpc_firmware_features |= FW_FEATURE_LPAR;
fw_hypertas_feature_init(prop, len);
}
also do we expect other firmware features to be set along with
FW_FEATURE_LPAR?
> if (basep && entryp && sizep) {
> rtas.base = *basep;
> rtas.entry = *entryp;
> diff --git a/arch/powerpc/kexec/core.c b/arch/powerpc/kexec/core.c
> index 48525e8b5730..f69cf3e370ec 100644
> --- a/arch/powerpc/kexec/core.c
> +++ b/arch/powerpc/kexec/core.c
> @@ -147,11 +147,16 @@ void __init reserve_crashkernel(void)
> if (!crashk_res.start) {
> #ifdef CONFIG_PPC64
> /*
> - * On 64bit we split the RMO in half but cap it at half of
> - * a small SLB (128MB) since the crash kernel needs to place
> - * itself and some stacks to be in the first segment.
> + * crash kernel needs to placed in the first segment. On LPAR
> + * setting crash kernel start to mid of RMA size (512MB or more)
> + * would help primary kernel to boot properly on large config
> + * LPAR (with core count 192 or more) and for the reset keep
> + * cap the crash kernel start at 128MB offse.
> */
> - crashk_res.start = min(0x8000000ULL, (ppc64_rma_size / 2));
> + if (firmware_has_feature(FW_FEATURE_LPAR))
> + crashk_res.start = ppc64_rma_size / 2;
> + else
> + crashk_res.start = min(0x8000000ULL, (ppc64_rma_size / 2));
> #else
> crashk_res.start = KDUMP_KERNELBASE;
> #endif
>
next prev parent reply other threads:[~2021-10-04 16:38 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-04 15:11 [PATCH 0/3] Update crashkernel offset to allow kernel to boot on large config LPARs Sourabh Jain
2021-10-04 15:11 ` [PATCH 1/3] fixup mmu_features immediately after getting cpu pa features Sourabh Jain
2021-10-04 15:32 ` Aneesh Kumar K.V
2021-10-05 5:54 ` Mahesh J Salgaonkar
2021-10-04 15:11 ` [PATCH 2/3] Remove 256MB limit restriction for boot cpu paca allocation Sourabh Jain
2021-10-05 5:58 ` kernel test robot
2021-10-04 15:11 ` [PATCH 3/3] powerpc: Set crashkernel offset to mid of RMA region Sourabh Jain
2021-10-04 16:06 ` Aneesh Kumar K.V [this message]
2021-10-04 17:17 ` Sourabh Jain
2021-10-05 8:14 ` Sourabh Jain
-- strict thread matches above, loose matches on Subject: below --
2021-10-08 16:15 [PATCH 0/3] Update crashkernel offset to allow kernel to boot on large config LPARs Sourabh Jain
2021-10-08 16:15 ` [PATCH 3/3] powerpc: Set crashkernel offset to mid of RMA region Sourabh Jain
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=f13e218e-4e38-4076-672f-d555d7abfc02@linux.ibm.com \
--to=aneesh.kumar@linux.ibm.com \
--cc=abdhalee@linux.vnet.ibm.com \
--cc=hbathini@linux.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@ozlabs.org \
--cc=mahesh@linux.vnet.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).