powerpc: Set crashkernel offset to mid of RMA region

Sourabh Jain sourabhjain at linux.ibm.com
Fri Feb 4 20:00:27 AEDT 2022


On 01/02/22 16:40, Hari Bathini wrote:
>
>
> On 28/01/22 3:34 pm, Sourabh Jain wrote:
>> On large config LPARs (having 192 and more cores), Linux fails to boot
>> due to insufficient memory in the first memblock. It is due to the
>> memory reservation for the crash kernel which starts at 128MB offset of
>> the first memblock. This memory reservation for the crash kernel doesn't
>> leave enough space in the first memblock to accommodate other essential
>> system resources.
>>
>> The crash kernel start address was set to 128MB offset by default to
>> ensure that the crash kernel get some memory below the RMA region which
>> is used to be of size 256MB. But given that the RMA region size can be
>> 512MB or more, setting the crash kernel offset to mid of RMA size will
>> leave enough space for kernel to allocate memory for other system
>> resources.
>>
>> Since the above crash kernel offset change is only applicable to the 
>> LPAR
>> platform, the LPAR feature detection is pushed before the crash kernel
>> reservation. The rest of LPAR specific initialization will still
>> be done during pseries_probe_fw_features as usual.
>>
>> Signed-off-by: Sourabh Jain<sourabhjain at linux.ibm.com>
>> Reported-and-tested-by: Abdul haleem<abdhalee at linux.vnet.ibm.com>
>>
>> ---
>>   arch/powerpc/kernel/rtas.c |  4 ++++
>>   arch/powerpc/kexec/core.c  | 15 +++++++++++----
>>   2 files changed, 15 insertions(+), 4 deletions(-)
>>
>>   ---
>>   Change in v3:
>>     Dropped 1st and 2nd patch from v2. 1st and 2nd patch from v2 patch
>>     series [1] try to discover 1T segment MMU feature support
>>     BEFORE boot CPU paca allocation ([1] describes why it is needed).
>>     MPE has posted a patch [2] that archives a similar objective by 
>> moving
>>     boot CPU paca allocation after mmu_early_init_devtree().
>>
>
>> NOTE: This patch is dependent on the patch [2].
>>
>> [1]https://patchwork.ozlabs.org/project/linuxppc-dev/patch/20211018084434.217772-3-sourabhjain@linux.ibm.com/ 
>>
>> [2]https://lists.ozlabs.org/pipermail/linuxppc-dev/2022-January/239175.html 
>>
>
> This dependency info must be captured somewhere within the changelog to
> be useful.

Added about the dependent patch in v4 patch commit message.
v4 patch link: 
https://lists.ozlabs.org/pipermail/linuxppc-dev/2022-February/239642.html

Thanks for the review Hari.

- Sourabh Jain


More information about the Linuxppc-dev mailing list