[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <b2844a83-d2b2-6e88-780c-3a41be882086@linux.ibm.com>
Date: Tue, 5 Oct 2021 13:44:36 +0530
From: Sourabh Jain <sourabhjain@...ux.ibm.com>
To: "Aneesh Kumar K.V" <aneesh.kumar@...ux.ibm.com>, mpe@...erman.id.au
Cc: Abdul haleem <abdhalee@...ux.vnet.ibm.com>,
mahesh@...ux.vnet.ibm.com, linux-kernel@...r.kernel.org,
hbathini@...ux.ibm.com, linuxppc-dev@...abs.org
Subject: Re: [PATCH 3/3] powerpc: Set crashkernel offset to mid of RMA region
On 04/10/21 21:36, Aneesh Kumar K.V wrote:
> 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@...ux.ibm.com>
>> Reported-and-tested-by: Abdul haleem <abdhalee@...ux.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?
This patch needs to move crash kernel reservation to mid point of rma
size for LPAR in reserve_crashkernel() function. Since
reserve_crashkernel() is called too early even before
powerpc_firmware_features is set with FW_FEATURE_LPAR, the check for if
(firmware_has_feature(FW_FEATURE_LPAR)) fails and hence we only need to
make sure that we set this flag early during early_init_dt_scan_rtas().
The rest of the LPAR specific initialization isn't required at this
point and will be still done during pseries_probe_fw_features() as usual.
Thanks,
Sourabh Jain
Powered by blists - more mailing lists