From: "Pandey, Radhey Shyam" <radheys@amd.com>
To: Mike Rapoport <rppt@kernel.org>
Cc: Pratyush Yadav <pratyush@kernel.org>,
Radhey Shyam Pandey <radhey.shyam.pandey@amd.com>,
akpm@linux-foundation.org, david@kernel.org, ljs@kernel.org,
liam@infradead.org, vbabka@kernel.org, surenb@google.com,
mhocko@suse.com, baoquan.he@linux.dev, pasha.tatashin@soleen.com,
graf@amazon.com, linux-mm@kvack.org,
linux-kernel@vger.kernel.org, kexec@lists.infradead.org
Subject: Re: [RFC PATCH 1/2] kexec: do not place the next kernel in a fixed-address CMA area
Date: Fri, 30 Oct 2026 23:29:11 +0530 [thread overview]
Message-ID: <9463783e-5425-4ba8-9155-033c21d7f516@amd.com> (raw)
In-Reply-To: <auSHrdDdFrWRsuzM@kernel.org>
On 10/30/2026 5:33 PM, Mike Rapoport wrote:
> On Fri, Oct 30, 2026 at 01:22:50PM +0530, Pandey, Radhey Shyam wrote:
>> On 10/29/2026 6:41 PM, Pratyush Yadav wrote:
>>> On Thu, Oct 29 2026, Mike Rapoport wrote:
>>>> On Wed, Oct 28, 2026 at 03:03:16PM +0100, Pratyush Yadav wrote:
>>>>> On Wed, Oct 14 2026, Radhey Shyam Pandey wrote:
>>>>>> @@ -304,6 +317,7 @@ int __init cma_init_reserved_mem(phys_addr_t base, phys_addr_t size,
>>>>>> cma->ranges[0].count = cma->count;
>>>>>> cma->nranges = 1;
>>>>>> cma->nid = NUMA_NO_NODE;
>>>>>> + set_bit(CMA_FIXED_BASE, &cma->flags);
>>>>>> *res_cma = cma;
>>>>>> @@ -517,6 +531,8 @@ static int __init __cma_declare_contiguous_nid(phys_addr_t *basep,
>>>>>> }
>>>>>> (*res_cma)->nid = nid;
>>>>>> + if (!fixed)
>>>>>> + clear_bit(CMA_FIXED_BASE, &(*res_cma)->flags);
>>>>>
>>>>> Nit: This reads a bit odd. cma_init_reserved_mem() sets the fixed base
>>>>> and then you clear it later. Wouldn't it be better to just pass the
>>>>> fixed boolean to cma_init_reserved_mem()?
>>>>
>>>> Actually, we shouldn't expose cma_init_reserved_mem() at all.
>>>>
>>>> The current callers of cma_init_reserved_mem() should be switched to
>>>> cma_declare_contiguous_nid() that does sanity checks before calling
>>>> cma_init_reserved_mem().
>>
>> Thanks Pratyush and Mike for the review.
>>
>> The switch from cma_init_reserved_mem() to cma_declare_contiguous_nid()
>> looks like a broader CMA refactoring and requires additional changes to work
>> correctly.
>
> Hmm, you are right.
>
> How about we invert the flag meaning?
> Than cma_declare_contiguous_* will set it where appropriate and we won't
> have the weirdness Pratyush pointed out.
That's a good point. I will invert the flag meaning - something like.
__cma_declare_contiguous_nid()
<snip>
+ if (!fixed)
+ set_bit(CMA_DYNAMIC_BASE, &(*res_cma)->flags);
So the v2 series would look like:
mm/cma: drop the duplicate alignment check in rmem_cma_setup()
of: reserved_mem: keep the reservation when node_init returns -EBUSY
mm/cma: reject CMA areas that overlap the kernel image
kexec: do not place the next kernel in a fixed-address CMA area
>
> And Radhey, please, make your LLM to spill more concise and to the point
> text and teach it to trim emails ;-)
Noted. Will take care of it in next version.
Thanks,
Radhey
next prev parent reply other threads:[~2026-10-30 17:59 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-14 14:57 [RFC PATCH 0/2] kexec,mm/cma: do not run the next kernel from a fixed-base " Radhey Shyam Pandey
2026-10-14 14:57 ` [RFC PATCH 1/2] kexec: do not place the next kernel in a fixed-address " Radhey Shyam Pandey
2026-10-28 14:03 ` Pratyush Yadav
2026-10-29 7:35 ` Mike Rapoport
2026-10-29 13:11 ` Pratyush Yadav
2026-10-30 7:52 ` Pandey, Radhey Shyam
2026-10-30 12:03 ` Mike Rapoport
2026-10-30 17:59 ` Pandey, Radhey Shyam [this message]
2026-10-14 14:57 ` [RFC PATCH 2/2] mm/cma: reject CMA areas that overlap the kernel image Radhey Shyam Pandey
2026-10-28 14:16 ` Pratyush Yadav
2026-10-29 7:42 ` Mike Rapoport
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=9463783e-5425-4ba8-9155-033c21d7f516@amd.com \
--to=radheys@amd.com \
--cc=akpm@linux-foundation.org \
--cc=baoquan.he@linux.dev \
--cc=david@kernel.org \
--cc=graf@amazon.com \
--cc=kexec@lists.infradead.org \
--cc=liam@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=ljs@kernel.org \
--cc=mhocko@suse.com \
--cc=pasha.tatashin@soleen.com \
--cc=pratyush@kernel.org \
--cc=radhey.shyam.pandey@amd.com \
--cc=rppt@kernel.org \
--cc=surenb@google.com \
--cc=vbabka@kernel.org \
/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
all inboxes | Powered by JetHome®