From: Sourabh Jain <sourabhjain@linux.ibm.com>
To: Jiri Bohac <jbohac@suse.cz>
Cc: linuxppc-dev@lists.ozlabs.org,
Hari Bathini <hbathini@linux.ibm.com>,
Madhavan Srinivasan <maddy@linux.ibm.com>,
Mahesh Salgaonkar <mahesh@linux.ibm.com>,
Michael Ellerman <mpe@ellerman.id.au>,
"Ritesh Harjani (IBM)" <ritesh.list@gmail.com>,
Shivang Upadhyay <shivangu@linux.ibm.com>
Subject: Re: [PATCH v2] powerpc/kdump: Add support for crashkernel CMA reservation
Date: Fri, 24 Oct 2025 10:41:35 +0530 [thread overview]
Message-ID: <1c53ad36-7f82-4f3c-b2b2-0d415aed37ad@linux.ibm.com> (raw)
In-Reply-To: <aPpIdHMnSHRq8M6B@dwarf.suse.cz>
On 23/10/25 20:53, Jiri Bohac wrote:
> On Thu, Oct 23, 2025 at 05:44:12PM +0530, Sourabh Jain wrote:
>> @@ -595,6 +602,13 @@ int get_crash_memory_ranges(struct crash_mem **mem_ranges)
>> if (ret)
>> goto out;
>>
>> + for (i = 0; i < crashk_cma_cnt; ++i) {
>> + ret = crash_exclude_mem_range(tmem, crashk_cma_ranges[i].start,
>> + crashk_cma_ranges[i].end);
>> + if (ret)
>> + goto out;
>> + }
>> +
> I think the loop needs to check if tmem->nr_ranges == tmem->max_nr_ranges and
> reallocate in each iteration, just like it's done when excluding the crashk_res
> region above:
Yeah, nice catch. I thought it would get adjusted automatically, as it is
done in the add_mem_range function.
Thanks for the review. I will update the patch and send v3.
> /* Reallocate memory ranges if there is no space to split ranges */
> tmem = *mem_ranges;
> if (tmem && (tmem->nr_ranges == tmem->max_nr_ranges)) {
> tmem = realloc_mem_ranges(mem_ranges);
> if (!tmem)
> goto out;
> }
>
> /* Exclude crashkernel region */
> ret = crash_exclude_mem_range(tmem, crashk_res.start, crashk_res.end);
> if (ret)
> goto out;
>
>
>
prev parent reply other threads:[~2025-10-24 5:11 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-23 12:14 [PATCH v2] powerpc/kdump: Add support for crashkernel CMA reservation Sourabh Jain
2025-10-23 15:23 ` Jiri Bohac
2025-10-24 5:11 ` Sourabh Jain [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=1c53ad36-7f82-4f3c-b2b2-0d415aed37ad@linux.ibm.com \
--to=sourabhjain@linux.ibm.com \
--cc=hbathini@linux.ibm.com \
--cc=jbohac@suse.cz \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=maddy@linux.ibm.com \
--cc=mahesh@linux.ibm.com \
--cc=mpe@ellerman.id.au \
--cc=ritesh.list@gmail.com \
--cc=shivangu@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).