Skip to content

mm: move vma_(kernel|mmu)_pagesize() out of hugetlb.c

David Hildenbrand (Arm) kvm linux-mm linuxppc-dev lkml 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest4 patches 1 replyIn review 3 of 4 applied
  2. v14 patches 16 repliesSuperseded

Changes in v2 from the cover letter

* Fixup VMA test in patch #2
* Actually CC all people listed below on all patches.

Patches in v2 3 of 4 applied

#Subject and filesSizeRepliesApplied
1/4mm: move vma_kernel_pagesize() from hugetlb to mm.hinclude/linux/hugetlb.h include/linux/mm.h mm/hugetlb.c+20 -240 replies
2/4mm: move vma_mmu_pagesize() from hugetlb to vma.cinclude/linux/hugetlb.h include/linux/mm.h mm/hugetlb.c +2 more+28 -180 repliesApplied
3/4KVM: remove hugetlb.h inclusionvirt/kvm/kvm_main.c+0 -10 repliesApplied
4/4KVM: PPC: remove hugetlb.h inclusionarch/powerpc/kvm/book3s_hv.c+0 -11 replyApplied

Reviews trailers per patch

All 4 patches have a Reviewed-by or Acked-by.

PatchLorenzo Stoakes (Oracle)Mike Rapoport (Microsoft)Ritesh Harjani
1/4R-b A-b
2/4R-b A-b
3/4R-b A-b
4/4R-b A-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v2 thread

Cover letter [PATCH v2 0/4] mm: move vma_(kernel|mmu)_pagesize() out of hugetlb.c

Looking into vma_(kernel|mmu)_pagesize(), I realized that there is one scenario where DAX would not do the right thing when the kernel is not compiled with hugetlb support.

Without hugetlb support, vma_(kernel|mmu)_pagesize() will always return PAGE_SIZE instead of using the ->pagesize() result provided by dax-device code.

Fix that by moving vma_kernel_pagesize() to core MM code, where it belongs. I don't think this is stable material, but am not 100% sure.

Also, move vma_mmu_pagesize() while at it. Remove the unnecessary hugetlb.h inclusion from KVM code.

Cross-compiled heavily.

v1 -> v2:
* Fixup VMA test in patch #2
* Actually CC all people listed below on all patches.

Cc Andrew Morton <[email protected]>
Cc Madhavan Srinivasan <[email protected]>
Cc Nicholas Piggin <[email protected]>
Cc Michael Ellerman <[email protected]>
Cc "Christophe Leroy (CS GROUP)" <[email protected]>
Cc Muchun Song <[email protected]>
Cc Oscar Salvador <[email protected]>
Cc Lorenzo Stoakes <[email protected]>
Cc "Liam R. Howlett" <[email protected]>
Cc Vlastimil Babka <[email protected]>
Cc Mike Rapoport <[email protected]>
Cc Suren Baghdasaryan <[email protected]>
Cc Michal Hocko <[email protected]>
Cc Jann Horn <[email protected]>
Cc Pedro Falcato <[email protected]>
Cc Paolo Bonzini <[email protected]>
Cc Dan Williams <[email protected]>

David Hildenbrand (Arm) (4):
mm: move vma_kernel_pagesize() from hugetlb to mm.h
mm: move vma_mmu_pagesize() from hugetlb to vma.c
KVM: remove hugetlb.h inclusion
KVM: PPC: remove hugetlb.h inclusion

 arch/powerpc/kvm/book3s_hv.c       |  1 -
 include/linux/hugetlb.h            | 14 --------------
 include/linux/mm.h                 | 22 ++++++++++++++++++++++
 mm/hugetlb.c                       | 28 ----------------------------
 mm/vma.c                           | 21 +++++++++++++++++++++
 tools/testing/vma/include/custom.h |  5 +++++
 virt/kvm/kvm_main.c                |  1 -
 7 files changed, 48 insertions(+), 44 deletions(-)

base-commit: f75825cdfc4c5477cffcfd2cafa4e5ce5aa67f13

Signature · 1 line
2.43.0