From: Ritesh Harjani (IBM) <ritesh.list@gmail.com>
To: Sourabh Jain <sourabhjain@linux.ibm.com>, linuxppc-dev@lists.ozlabs.org
Cc: Sourabh Jain <sourabhjain@linux.ibm.com>,
Baoquan he <bhe@redhat.com>, Jiri Bohac <jbohac@suse.cz>,
Hari Bathini <hbathini@linux.ibm.com>,
Madhavan Srinivasan <maddy@linux.ibm.com>,
Mahesh Salgaonkar <mahesh@linux.ibm.com>,
Michael Ellerman <mpe@ellerman.id.au>,
Shivang Upadhyay <shivangu@linux.ibm.com>,
kexec@lists.infradead.org
Subject: Re: [PATCH v7] powerpc/kdump: Add support for crashkernel CMA reservation
Date: Sat, 08 Nov 2025 08:14:51 +0530 [thread overview]
Message-ID: <87a50x450c.ritesh.list@gmail.com> (raw)
In-Reply-To: <20251107080334.708028-1-sourabhjain@linux.ibm.com>
Sourabh Jain <sourabhjain@linux.ibm.com> writes:
> Commit 35c18f2933c5 ("Add a new optional ",cma" suffix to the
> crashkernel= command line option") and commit ab475510e042 ("kdump:
> implement reserve_crashkernel_cma") added CMA support for kdump
> crashkernel reservation.
>
> Extend crashkernel CMA reservation support to powerpc.
>
Yup, would be nice to see this support landing in powerpc!
> The following changes are made to enable CMA reservation on powerpc:
>
> - Parse and obtain the CMA reservation size along with other crashkernel
> parameters
> - Call reserve_crashkernel_cma() to allocate the CMA region for kdump
> - Include the CMA-reserved ranges in the usable memory ranges for the
> kdump kernel to use.
> - Exclude the CMA-reserved ranges from the crash kernel memory to
> prevent them from being exported through /proc/vmcore.
>
> With the introduction of the CMA crashkernel regions,
> crash_exclude_mem_range() needs to be called multiple times to exclude
> both crashk_res and crashk_cma_ranges from the crash memory ranges. To
> avoid repetitive logic for validating mem_ranges size and handling
> reallocation when required, this functionality is moved to a new wrapper
> function crash_exclude_mem_range_guarded().
>
> To ensure proper CMA reservation, reserve_crashkernel_cma() is called
> after pageblock_order is initialized.
>
> Update kernel-parameters.txt to document CMA support for crashkernel on
> powerpc architecture.
>
> Cc: Baoquan he <bhe@redhat.com>
> Cc: Jiri Bohac <jbohac@suse.cz>
> Cc: Hari Bathini <hbathini@linux.ibm.com>
> Cc: Madhavan Srinivasan <maddy@linux.ibm.com>
> Cc: Mahesh Salgaonkar <mahesh@linux.ibm.com>
> Cc: Michael Ellerman <mpe@ellerman.id.au>
> Cc: Ritesh Harjani (IBM) <ritesh.list@gmail.com>
> Cc: Shivang Upadhyay <shivangu@linux.ibm.com>
> Cc: kexec@lists.infradead.org
> Signed-off-by: Sourabh Jain <sourabhjain@linux.ibm.com>
> ---
> Changelog:
>
> v6 -> v7
> https://lore.kernel.org/all/20251104132818.1724562-1-sourabhjain@linux.ibm.com/
> - declare crashk_cma_size static
>
> ---
> .../admin-guide/kernel-parameters.txt | 2 +-
> arch/powerpc/include/asm/kexec.h | 2 +
> arch/powerpc/kernel/setup-common.c | 4 +-
> arch/powerpc/kexec/core.c | 10 ++++-
> arch/powerpc/kexec/ranges.c | 43 ++++++++++++++-----
> 5 files changed, 47 insertions(+), 14 deletions(-)
Although my reviewed by may not count much here since I am not deeply
familiar with arch/powerpc/kexec/** part..
But FWIW, the patch overall looks logical to me.
Keeping cma reservation in setup_arch() is the right thing to do to
avoid issues like these in past [1]. The error handling logic and the
loop logic for handling CMA ranges also looks correct to me.
So feel free to add:
Reviewed-by: Ritesh Harjani (IBM) <ritesh.list@gmail.com>
[1]: https://lore.kernel.org/linuxppc-dev/3ae208e48c0d9cefe53d2dc4f593388067405b7d.1729146153.git.ritesh.list@gmail.com/
next prev parent reply other threads:[~2025-11-08 3:14 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-07 8:03 [PATCH v7] powerpc/kdump: Add support for crashkernel CMA reservation Sourabh Jain
2025-11-08 2:44 ` Ritesh Harjani [this message]
2025-11-08 4:26 ` 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=87a50x450c.ritesh.list@gmail.com \
--to=ritesh.list@gmail.com \
--cc=bhe@redhat.com \
--cc=hbathini@linux.ibm.com \
--cc=jbohac@suse.cz \
--cc=kexec@lists.infradead.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=maddy@linux.ibm.com \
--cc=mahesh@linux.ibm.com \
--cc=mpe@ellerman.id.au \
--cc=shivangu@linux.ibm.com \
--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).