[PATCH v3 0/3] Fixes for hugetlb on arm64

Ryan Roberts posted 3 patches 9 months, 3 weeks ago
arch/arm64/include/asm/hugetlb.h     | 26 ++++++++----
arch/arm64/mm/hugetlbpage.c          | 61 ++++++++++++----------------
arch/loongarch/include/asm/hugetlb.h |  6 ++-
arch/mips/include/asm/hugetlb.h      |  6 ++-
arch/parisc/include/asm/hugetlb.h    |  2 +-
arch/parisc/mm/hugetlbpage.c         |  2 +-
arch/powerpc/include/asm/hugetlb.h   |  6 ++-
arch/riscv/include/asm/hugetlb.h     |  3 +-
arch/riscv/mm/hugetlbpage.c          |  2 +-
arch/s390/include/asm/hugetlb.h      | 16 ++++++--
arch/s390/mm/hugetlbpage.c           |  4 +-
arch/sparc/include/asm/hugetlb.h     |  2 +-
arch/sparc/mm/hugetlbpage.c          |  2 +-
include/asm-generic/hugetlb.h        |  2 +-
include/linux/hugetlb.h              |  4 +-
mm/hugetlb.c                         |  4 +-
16 files changed, 82 insertions(+), 66 deletions(-)
[PATCH v3 0/3] Fixes for hugetlb on arm64
Posted by Ryan Roberts 9 months, 3 weeks ago
Hi All,

This series contains some fixes for hugetlb on arm64. It turns out that I will
need to rework the companion performance improvement series a bit and as a
result won't be relying on the purely mm fix that was patch 4 in v2. So I've
dropped that patch and will send it to mm separately.

I think this should be ready for merge now.

Changes since v2 [2]
====================
- Added Rb/Ab from various people - Thanks!
- Reworked num_contig_ptes() to return 1 by default and warn for bad sizes
- Fixed some formatting issues in s390 header
- Moved s390's huge_ptep_get_and_clear() to header and made it inline
- Removed patch 4; I'll send this to mm list separately
- Fixed various typos in commit logs

Changes since v1 [1]
====================
- Added Rb from Anshuman - Thanks!
- Added "#ifndef __PAGETABLE_PMD_FOLDED" around PUD_SIZE in flush_hugetlb_tlb_range()

I've marked all of these as candidates for backport to stable.

Applies on top of v6.14-rc3. All mm selftests run and pass.

[1] https://lore.kernel.org/all/20250205151003.88959-1-ryan.roberts@arm.com/
[2] https://lore.kernel.org/all/20250217140419.1702389-1-ryan.roberts@arm.com/

Thanks,
Ryan

Ryan Roberts (3):
  mm: hugetlb: Add huge page size param to huge_ptep_get_and_clear()
  arm64: hugetlb: Fix huge_ptep_get_and_clear() for non-present ptes
  arm64: hugetlb: Fix flush_hugetlb_tlb_range() invalidation level

 arch/arm64/include/asm/hugetlb.h     | 26 ++++++++----
 arch/arm64/mm/hugetlbpage.c          | 61 ++++++++++++----------------
 arch/loongarch/include/asm/hugetlb.h |  6 ++-
 arch/mips/include/asm/hugetlb.h      |  6 ++-
 arch/parisc/include/asm/hugetlb.h    |  2 +-
 arch/parisc/mm/hugetlbpage.c         |  2 +-
 arch/powerpc/include/asm/hugetlb.h   |  6 ++-
 arch/riscv/include/asm/hugetlb.h     |  3 +-
 arch/riscv/mm/hugetlbpage.c          |  2 +-
 arch/s390/include/asm/hugetlb.h      | 16 ++++++--
 arch/s390/mm/hugetlbpage.c           |  4 +-
 arch/sparc/include/asm/hugetlb.h     |  2 +-
 arch/sparc/mm/hugetlbpage.c          |  2 +-
 include/asm-generic/hugetlb.h        |  2 +-
 include/linux/hugetlb.h              |  4 +-
 mm/hugetlb.c                         |  4 +-
 16 files changed, 82 insertions(+), 66 deletions(-)

--
2.43.0
Re: [PATCH v3 0/3] Fixes for hugetlb on arm64
Posted by Will Deacon 9 months, 3 weeks ago
On Wed, 26 Feb 2025 12:06:50 +0000, Ryan Roberts wrote:
> This series contains some fixes for hugetlb on arm64. It turns out that I will
> need to rework the companion performance improvement series a bit and as a
> result won't be relying on the purely mm fix that was patch 4 in v2. So I've
> dropped that patch and will send it to mm separately.
> 
> I think this should be ready for merge now.
> 
> [...]

Applied to arm64 (for-next/fixes), thanks!

[1/3] mm: hugetlb: Add huge page size param to huge_ptep_get_and_clear()
      https://git.kernel.org/arm64/c/02410ac72ac3
[2/3] arm64: hugetlb: Fix huge_ptep_get_and_clear() for non-present ptes
      https://git.kernel.org/arm64/c/49c87f767774
[3/3] arm64: hugetlb: Fix flush_hugetlb_tlb_range() invalidation level
      https://git.kernel.org/arm64/c/eed6bfa8b282

Cheers,
-- 
Will

https://fixes.arm64.dev
https://next.arm64.dev
https://will.arm64.dev