From: Mike Rapoport <rppt@kernel.org>
To: Tao pilgrim <pilgrimtao@gmail.com>
Cc: davem@davemloft.net, andreas@gaisler.com,
akpm@linux-foundation.org, david@kernel.org,
lorenzo.stoakes@oracle.com, Liam.Howlett@oracle.com,
vbabka@suse.cz, surenb@google.com, mhocko@suse.com,
kevin.brodsky@arm.com, dave.hansen@linux.intel.com,
ziy@nvidia.com, chengkaitao@kylinos.cn, willy@infradead.org,
zhengqi.arch@bytedance.com, sparclinux@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-mm@kvack.org
Subject: Re: [PATCH] sparc: Use vmemmap_populate_hugepages for vmemmap_populate
Date: Thu, 18 Dec 2025 15:17:44 +0200 [thread overview]
Message-ID: <aUP--JzrvOm1-Q2P@kernel.org> (raw)
In-Reply-To: <CAAWJmAa44SF=dj+FTiXn0aZwLLGbSTAieb8Cy73RE0sGAkAYLQ@mail.gmail.com>
On Thu, Dec 18, 2025 at 08:29:27PM +0800, Tao pilgrim wrote:
> On Thu, Dec 18, 2025 at 8:11 PM Mike Rapoport <rppt@kernel.org> wrote:
> >
> > On Thu, Dec 18, 2025 at 07:45:52PM +0800, Tao pilgrim wrote:
> > > On Thu, Dec 18, 2025 at 7:14 PM Mike Rapoport <rppt@kernel.org> wrote:
> > > >
> > > > On Wed, Dec 17, 2025 at 08:08:58PM +0800, chengkaitao wrote:
> > > > > From: Chengkaitao <chengkaitao@kylinos.cn>
> > > > >
> > > > > 1. Added the vmemmap_false_pmd function to accommodate architectures
> > > > > that do not support basepages.
> > > > > 2. In the SPARC architecture, reimplemented vmemmap_populate using
> > > > > vmemmap_populate_hugepages.
> > > >
> > > > What problem this patch is trying to solve?
> > >
> > > Following the pattern established by other architectures, vmemmap_populate
> > > is reimplemented using vmemmap_populate_hugepages in the SPARC architecture,
> > > which fulfills the intended purpose of vmemmap_populate_hugepages.
> >
> > But what's wrong with the current sparc::vmemmap_populate()?
>
> The current implementation of sparc::vmemmap_populate() is correct
> and functional.
>
> However, I believe that generalizing vmemmap_populate_hugepages()
> still results in certain architectures requiring special-case handling
> branches, which is contrary to our goal of a unified implementation.
>
> Another benefit is that it allows us to eliminate the external
> declarations of vmemmap_p?d_populate functions and convert
> them to static functions.
If the goals are to provide a unified implementation and eliminate the
external declarations of vmemmap_p?d_populate() functions, I'd suggest to
send all this a single series rather than a single patch that updates sparc
implementation.
Regarding the ability of sparc to fallback to vmemmap_populate_basepages(),
it does not seem to me that this is an architectural limitation. sparc uses
base pages in the kernel page tables, so it should be able to use them in
vmemmap as well.
> > > The functional logic remains unchanged.
> > >
> > > > > Signed-off-by: Chengkaitao <chengkaitao@kylinos.cn>
> > > > > ---
>
> --
> Yours,
> Kaitao Cheng
--
Sincerely yours,
Mike.
next prev parent reply other threads:[~2025-12-18 13:17 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-17 12:08 chengkaitao
2025-12-18 8:44 ` David Hildenbrand (Red Hat)
2025-12-18 11:02 ` Tao pilgrim
2025-12-18 11:49 ` David Hildenbrand (Red Hat)
2025-12-18 12:08 ` Tao pilgrim
2025-12-18 11:14 ` Mike Rapoport
2025-12-18 11:45 ` Tao pilgrim
2025-12-18 12:11 ` Mike Rapoport
2025-12-18 12:29 ` Tao pilgrim
2025-12-18 13:17 ` Mike Rapoport [this message]
2025-12-18 13:36 ` Tao pilgrim
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=aUP--JzrvOm1-Q2P@kernel.org \
--to=rppt@kernel.org \
--cc=Liam.Howlett@oracle.com \
--cc=akpm@linux-foundation.org \
--cc=andreas@gaisler.com \
--cc=chengkaitao@kylinos.cn \
--cc=dave.hansen@linux.intel.com \
--cc=davem@davemloft.net \
--cc=david@kernel.org \
--cc=kevin.brodsky@arm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=lorenzo.stoakes@oracle.com \
--cc=mhocko@suse.com \
--cc=pilgrimtao@gmail.com \
--cc=sparclinux@vger.kernel.org \
--cc=surenb@google.com \
--cc=vbabka@suse.cz \
--cc=willy@infradead.org \
--cc=zhengqi.arch@bytedance.com \
--cc=ziy@nvidia.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