[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20251213080038.10917-1-lance.yang@linux.dev>
Date: Sat, 13 Dec 2025 16:00:22 +0800
From: Lance Yang <lance.yang@...ux.dev>
To: akpm@...ux-foundation.org
Cc: will@...nel.org,
aneesh.kumar@...nel.org,
npiggin@...il.com,
peterz@...radead.org,
tglx@...utronix.de,
mingo@...hat.com,
bp@...en8.de,
dave.hansen@...ux.intel.com,
x86@...nel.org,
hpa@...or.com,
arnd@...db.de,
david@...nel.org,
lorenzo.stoakes@...cle.com,
ziy@...dia.com,
baolin.wang@...ux.alibaba.com,
Liam.Howlett@...cle.com,
npache@...hat.com,
ryan.roberts@....com,
dev.jain@....com,
baohua@...nel.org,
ioworker0@...il.com,
shy828301@...il.com,
riel@...riel.com,
jannh@...gle.com,
linux-arch@...r.kernel.org,
linux-mm@...ck.org,
linux-kernel@...r.kernel.org
Subject: [PATCH RFC 0/3] skip redundant TLB sync IPIs
Hi all,
When unsharing hugetlb PMD page tables or collapsing pages in khugepaged,
we send two IPIs: one for TLB invalidation, and another to synchronize
with concurrent GUP-fast walkers. However, if the TLB flush already
reaches all CPUs, the second IPI is redundant. GUP-fast runs with IRQs
disabled, so when the TLB flush IPI completes, any concurrent GUP-fast
must have finished.
This series introduces a way for architectures to indicate their TLB flush
already provides full synchronization, allowing the redundant IPI to be
skipped. For now, the optimization is implemented for x86 first and applied
to both hugetlb PMD unsharing and khugepaged. I will dig into other
architectures later, and folks maintaining other architectures are welcome
to help out.
David Hildenbrand did the initial implementation. I just built on his work
and relied on off-list discussions to push it further — thanks a lot David!
Lance Yang (3):
mm/tlb: allow architectures to skip redundant TLB sync IPIs
x86/mm: implement redundant IPI elimination for PMD unsharing
mm/khugepaged: skip redundant IPI in collapse_huge_page()
arch/x86/include/asm/tlb.h | 17 ++++++++++++++++-
include/asm-generic/tlb.h | 22 +++++++++++++++++++++-
mm/khugepaged.c | 7 ++++++-
3 files changed, 43 insertions(+), 3 deletions(-)
--
2.49.0
Powered by blists - more mailing lists