[PATCH 5.15.y 0/6] mm/hugetlb: fixes for PMD table sharing (incl. using mmu_gather)

David Hildenbrand (Arm)
2026-02-18T11:01:40Z

Backport of [1] for 5.15. Backport notes are in the individual patches.

I'm also including a cleanup/fix from Miaohe that makes backporting at
least a bit easier, followed by the fix from Jane.

Tested on x86-64 with the original reproducer.

[1] https://lore.kernel.org/linux-mm/20251223214037.580860-1-david@kernel.org/

Cc: Jane Chu <jane.chu@oracle.com>
Cc: Harry Yoo <harry.yoo@oracle.com>
Cc: Oscar Salvador <osalvador@suse.de>
Cc: Jann Horn <jannh@google.com>
Cc: Liu Shixin <liushixin2@huawei.com>
Cc: Muchun Song <muchun.song@linux.dev>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Rik van Riel <riel@surriel.com>
Cc: Laurence Oberman <loberman@redhat.com>
Cc: Lance Yang <lance.yang@linux.dev>
Cc: Liu Shixin <liushixin2@huawei.com>
Cc: Miaohe Lin <linmiaohe@huawei.com>

David Hildenbrand (Red Hat) (4):
mm/hugetlb: fix hugetlb_pmd_shared()
mm/hugetlb: fix two comments related to huge_pmd_unshare()
mm/rmap: fix two comments related to huge_pmd_unshare()
mm/hugetlb: fix excessive IPI broadcasts when unsharing PMD tables
using mmu_gather

Jane Chu (1):
mm/hugetlb: fix copy_hugetlb_page_range() to use ->pt_share_count

Miaohe Lin (1):
mm/hugetlb: make detecting shared pte more reliable

include/asm-generic/tlb.h | 77 ++++++++++++++++++++-
include/linux/hugetlb.h | 17 +++--
include/linux/mm_types.h | 1 +
mm/hugetlb.c | 141 +++++++++++++++++++-------------------
mm/mmu_gather.c | 33 +++++++++
mm/rmap.c | 38 +++++-----
6 files changed, 210 insertions(+), 97 deletions(-)

--
2.43.0