From: Lance Yang <lance.yang@linux.dev>
To: songmuchun@bytedance.com
Cc: akpm@linux-foundation.org, rppt@kernel.org, maddy@linux.ibm.com,
muchun.song@linux.dev, david@kernel.org, mpe@ellerman.id.au,
ritesh.list@gmail.com, aneesh.kumar@linux.ibm.com,
pavrampu@linux.ibm.com, lance.yang@linux.dev, qi.zheng@linux.dev,
linux-mm@kvack.org, linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH 6/7] powerpc/mm: remove radix-specific vmemmap PMD overrides
Date: Fri, 4 Dec 2026 17:41:32 +0800 [thread overview]
Message-ID: <20261204094132.69914-1-lance.yang@linux.dev> (raw)
In-Reply-To: <20261201115651.3400202-7-songmuchun@bytedance.com>
On Tue, Dec 01, 2026 at 07:56:50PM +0800, Muchun Song wrote:
>PowerPC radix vmemmap population has private implementations of
>vmemmap_set_pmd() and vmemmap_check_pmd() that duplicate the generic
>helpers in mm/sparse-vmemmap.c.
>
>Remove the radix-specific overrides so the common helpers are used
>instead. Since commit 4edd70ee6a7d ("mm/sparse-vmemmap:
>flush_cache_vmap() after hotplugging vmemmap"), the generic sparse
>vmemmap code calls flush_cache_vmap() after vmemmap population. On
>PowerPC, that provides the necessary ptesync.
>
>Signed-off-by: Muchun Song <songmuchun@bytedance.com>
>---
> arch/powerpc/mm/book3s64/radix_pgtable.c | 26 ------------------------
> 1 file changed, 26 deletions(-)
>
>diff --git a/arch/powerpc/mm/book3s64/radix_pgtable.c b/arch/powerpc/mm/book3s64/radix_pgtable.c
>index 23deabb53e09..6558fc74483f 100644
>--- a/arch/powerpc/mm/book3s64/radix_pgtable.c
>+++ b/arch/powerpc/mm/book3s64/radix_pgtable.c
>@@ -978,31 +978,6 @@ int __meminit radix__vmemmap_create_mapping(unsigned long start,
> return 0;
> }
>
>-int __meminit vmemmap_check_pmd(pmd_t *pmdp, int node,
>- unsigned long addr, unsigned long next)
>-{
>- int large = pmd_leaf(*pmdp);
>-
>- if (large)
>- vmemmap_verify(pmdp_ptep(pmdp), node, addr, next);
>-
>- return large;
>-}
>-
>-void __meminit vmemmap_set_pmd(pmd_t *pmdp, void *p, int node,
>- unsigned long addr, unsigned long next)
>-{
>- pte_t entry;
>- pte_t *ptep = pmdp_ptep(pmdp);
>-
>- VM_BUG_ON(!IS_ALIGNED(addr, PMD_SIZE));
>- entry = pfn_pte(__pa(p) >> PAGE_SHIFT, PAGE_KERNEL);
>- set_pte_at(&init_mm, addr, ptep, entry);
>- asm volatile("ptesync": : :"memory");
>-
>- vmemmap_verify(ptep, node, addr, next);
>-}
>-
> static pte_t * __meminit radix__vmemmap_pte_populate(pmd_t *pmdp, unsigned long addr,
> int node,
> struct vmem_altmap *altmap,
>@@ -1053,7 +1028,6 @@ static pte_t * __meminit radix__vmemmap_pte_populate(pmd_t *pmdp, unsigned long
> if (reuse)
> entry = pte_wrprotect(entry);
> set_pte_at(&init_mm, addr, pte, entry);
>- asm volatile("ptesync": : :"memory");
Cool, no more per-PTE ptesync :D Worth noting that in the changelog too.
Feel free to add:
Reviewed-by: Lance Yang <lance.yang@linux.dev>
next prev parent reply other threads:[~2026-12-04 9:41 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-01 11:56 [PATCH 0/7] mm: Generalize HVO vmemmap population Muchun Song
2026-12-01 11:56 ` [PATCH 1/7] mm/sparse-vmemmap: use page-table constructors for runtime tables Muchun Song
2026-12-02 13:35 ` Lance Yang
2026-12-03 2:04 ` Muchun Song
2026-12-01 11:56 ` [PATCH 2/7] mm/sparse-vmemmap: align page-table helpers with core MM Muchun Song
2026-12-02 13:55 ` Lance Yang
2026-12-01 11:56 ` [PATCH 3/7] mm/sparse-vmemmap: introduce vmemmap_optimizable_pte_populate Muchun Song
2026-12-02 22:56 ` Chris Down
2026-12-03 1:58 ` Muchun Song
2026-12-03 11:58 ` Lance Yang
2026-12-01 11:56 ` [PATCH 4/7] mm/sparse-vmemmap: support PMD mappings spanning sections Muchun Song
2026-12-04 7:48 ` Lance Yang
2026-12-01 11:56 ` [PATCH 5/7] powerpc/mm: fix uninitialized ZONE_DEVICE struct pages with PMDs Muchun Song
2026-12-04 9:29 ` Lance Yang
2026-12-01 11:56 ` [PATCH 6/7] powerpc/mm: remove radix-specific vmemmap PMD overrides Muchun Song
2026-12-04 9:41 ` Lance Yang [this message]
2026-12-01 11:56 ` [PATCH 7/7] powerpc/mm: reuse generic HVO vmemmap population Muchun Song
2026-12-02 22:56 ` [PATCH 0/7] mm: Generalize " Chris Down
2026-12-03 2:07 ` Muchun Song
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=20261204094132.69914-1-lance.yang@linux.dev \
--to=lance.yang@linux.dev \
--cc=akpm@linux-foundation.org \
--cc=aneesh.kumar@linux.ibm.com \
--cc=david@kernel.org \
--cc=linux-mm@kvack.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=maddy@linux.ibm.com \
--cc=mpe@ellerman.id.au \
--cc=muchun.song@linux.dev \
--cc=pavrampu@linux.ibm.com \
--cc=qi.zheng@linux.dev \
--cc=ritesh.list@gmail.com \
--cc=rppt@kernel.org \
--cc=songmuchun@bytedance.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