From: Mike Rapoport <rppt@kernel.org>
To: "Pandey, Radhey Shyam" <radheys@amd.com>
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 14:03:57 +0200 [thread overview]
Message-ID: <auSHrdDdFrWRsuzM@kernel.org> (raw)
In-Reply-To: <7625fa23-5f4b-4658-b17a-fe4e58103e7c@amd.com>
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.
And Radhey, please, make your LLM to spill more concise and to the point
text and teach it to trim emails ;-)
> Thanks,
> Radhey
>
--
Sincerely yours,
Mike.
next prev parent reply other threads:[~2026-10-30 12:04 UTC|newest]
Thread overview: 13+ 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 CMA area 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-14 15:07 ` sashiko-bot
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 [this message]
2026-10-30 17:59 ` Pandey, Radhey Shyam
2026-10-14 14:57 ` [RFC PATCH 2/2] mm/cma: reject CMA areas that overlap the kernel image Radhey Shyam Pandey
2026-10-14 15:09 ` sashiko-bot
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=auSHrdDdFrWRsuzM@kernel.org \
--to=rppt@kernel.org \
--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=radheys@amd.com \
--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