linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH RFC 00/12] mm/gup: Unify hugetlb, part 2
@ 2023-11-16  1:28 Peter Xu
  2023-11-16  1:28 ` [PATCH RFC 01/12] mm/hugetlb: Export hugetlbfs_pagecache_present() Peter Xu
                   ` (12 more replies)
  0 siblings, 13 replies; 58+ messages in thread
From: Peter Xu @ 2023-11-16  1:28 UTC (permalink / raw)
  To: linux-kernel, linux-mm
  Cc: Mike Kravetz, Kirill A . Shutemov, Lorenzo Stoakes,
	Axel Rasmussen, Matthew Wilcox, John Hubbard, Mike Rapoport,
	peterx, Hugh Dickins, David Hildenbrand, Andrea Arcangeli,
	Rik van Riel, James Houghton, Yang Shi, Jason Gunthorpe,
	Vlastimil Babka, Andrew Morton

This patchset is in RFC stage. It's mostly because it is only yet tested on
x86_64 in a VM.  Not even compile tested on PPC or any other archs, it
means at least the hugepd patch (patch 11) is mostly untested, or even not
compile tested.  Before doing that, I'd like to collect any information
from high level.

If anyone would like to provide any testing either over hugepd or CONT_PMD
/ CONT_PTE on ARM (before I reach there..), or RISCV over 64K Svnapot,
that'll be very much appreciated.  I'm copying PPC, ARM, RISCV list for
that.  It can be as simple as "./run_vmtests.sh -t gup_test -a" for now,
making sure hugetlb pages can be allocated along the way; the non-hugetlb
gup tests will guaranteed to be covered more or less, I suppose.

In summary, this is a continuous work for previous series:

https://lore.kernel.org/all/20230628215310.73782-1-peterx@redhat.com

And this more or less is my current take to move one more small step
towards merging hugetlb code into generic mm code, as much as we can.

That part-1 series dropped follow_hugetlb_page().  The plan of this one is
to further drops hugetlb_follow_page_mask().  The hugetlb GUP will use the
same code path for generic mm after whole set applied.

It means the generic code will need to at least understand hugepd, and
that's already done like so in fast-gup.  Fortunately it seems that's the
only major thing I need to teach GUP to share the common path for now
besides normal huge PxD entries.  Non-gup can be more challenging, but
that's a question for later.

Patch layout:
=============

Patch 1-4:    Preparation works, mm generic part
Patch 5-6:    Bugfixes; I think patch 5 if verified can be merged earlier
Patch 7-11:   Preparation works, gup part
Patch 12:     Drop hugetlb_follow_page_mask()

More information can be found in the commit messages of each patch.  Any
comment will be welcomed.  Thanks.

Peter Xu (12):
  mm/hugetlb: Export hugetlbfs_pagecache_present()
  mm: Provide generic pmd_thp_or_huge()
  mm: Export HPAGE_PXD_* macros even if !THP
  mm: Introduce vma_pgtable_walk_{begin|end}()
  mm/gup: Fix follow_devmap_p[mu]d() to return even if NULL
  mm/gup: Drop folio_fast_pin_allowed() in hugepd processing
  mm/gup: Refactor record_subpages() to find 1st small page
  mm/gup: Handle hugetlb for no_page_table()
  mm/gup: Handle huge pud for follow_pud_mask()
  mm/gup: Handle huge pmd for follow_pmd_mask()
  mm/gup: Handle hugepd for follow_page()
  mm/gup: Merge hugetlb into generic mm code

 include/linux/huge_mm.h |  34 +++----
 include/linux/hugetlb.h |  10 +-
 include/linux/mm.h      |   3 +
 include/linux/pgtable.h |   4 +
 mm/gup.c                | 197 +++++++++++++++++++++++++---------------
 mm/huge_memory.c        | 117 +++++++++++++-----------
 mm/hugetlb.c            |  75 +--------------
 mm/internal.h           |   6 +-
 mm/memory.c             |  12 +++
 9 files changed, 233 insertions(+), 225 deletions(-)

-- 
2.41.0



^ permalink raw reply	[flat|nested] 58+ messages in thread

end of thread, other threads:[~2023-12-04 16:49 UTC | newest]

Thread overview: 58+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-16  1:28 [PATCH RFC 00/12] mm/gup: Unify hugetlb, part 2 Peter Xu
2023-11-16  1:28 ` [PATCH RFC 01/12] mm/hugetlb: Export hugetlbfs_pagecache_present() Peter Xu
2023-11-23  7:23   ` Christoph Hellwig
2023-11-23 16:05     ` Peter Xu
2023-11-16  1:28 ` [PATCH RFC 02/12] mm: Provide generic pmd_thp_or_huge() Peter Xu
2023-11-16  1:28 ` [PATCH RFC 03/12] mm: Export HPAGE_PXD_* macros even if !THP Peter Xu
2023-11-23  7:23   ` Christoph Hellwig
2023-11-23  9:53     ` Mike Rapoport
2023-11-23 15:27       ` Peter Xu
2023-11-16  1:29 ` [PATCH RFC 04/12] mm: Introduce vma_pgtable_walk_{begin|end}() Peter Xu
2023-11-23  7:24   ` Christoph Hellwig
2023-11-23 16:11     ` Peter Xu
2023-11-24  4:02   ` Aneesh Kumar K.V
2023-11-24 15:34     ` Peter Xu
2023-11-16  1:29 ` [PATCH RFC 05/12] mm/gup: Fix follow_devmap_p[mu]d() to return even if NULL Peter Xu
2023-11-23  7:25   ` Christoph Hellwig
2023-11-23 17:59     ` Peter Xu
2023-11-16  1:29 ` [PATCH RFC 06/12] mm/gup: Drop folio_fast_pin_allowed() in hugepd processing Peter Xu
2023-11-20  8:26   ` Christoph Hellwig
2023-11-21 15:59     ` Peter Xu
2023-11-22  8:00       ` Christoph Hellwig
2023-11-22 15:22         ` Peter Xu
2023-11-23  7:21           ` Christoph Hellwig
2023-11-23 16:10             ` Peter Xu
2023-11-23 18:22           ` Christophe Leroy
2023-11-23 19:37             ` Peter Xu
2023-11-24  5:28               ` Aneesh Kumar K.V
2023-11-24  7:03               ` Christophe Leroy
2023-11-24  1:06           ` Michael Ellerman
2023-11-23 15:47         ` Matthew Wilcox
2023-11-23 17:22           ` Peter Xu
2023-11-23 19:11             ` Ryan Roberts
2023-11-23 19:46               ` Peter Xu
2023-11-24  9:06                 ` Ryan Roberts
2023-11-24 16:07                   ` Peter Xu
2023-11-30 21:30                     ` Peter Xu
2023-12-03 13:33                       ` Christophe Leroy
2023-12-04 11:11                         ` Ryan Roberts
2023-12-04 11:25                           ` Christophe Leroy
2023-12-04 11:46                             ` Ryan Roberts
2023-12-04 11:57                               ` Christophe Leroy
2023-12-04 12:02                                 ` Ryan Roberts
2023-12-04 16:48                           ` Peter Xu
2023-11-16  1:29 ` [PATCH RFC 07/12] mm/gup: Refactor record_subpages() to find 1st small page Peter Xu
2023-11-16 14:51   ` Matthew Wilcox
2023-11-16 19:40     ` Peter Xu
2023-11-16 19:41       ` Matthew Wilcox
2023-11-16  1:29 ` [PATCH RFC 08/12] mm/gup: Handle hugetlb for no_page_table() Peter Xu
2023-11-23  7:26   ` Christoph Hellwig
2023-11-16  1:29 ` [PATCH RFC 09/12] mm/gup: Handle huge pud for follow_pud_mask() Peter Xu
2023-11-23  7:28   ` Christoph Hellwig
2023-11-23 16:19     ` Peter Xu
2023-11-16  1:29 ` [PATCH RFC 10/12] mm/gup: Handle huge pmd for follow_pmd_mask() Peter Xu
2023-11-16  1:29 ` [PATCH RFC 11/12] mm/gup: Handle hugepd for follow_page() Peter Xu
2023-11-16  1:29 ` [PATCH RFC 12/12] mm/gup: Merge hugetlb into generic mm code Peter Xu
2023-11-23  7:29   ` Christoph Hellwig
2023-11-23 16:21     ` Peter Xu
2023-11-22 14:51 ` [PATCH RFC 00/12] mm/gup: Unify hugetlb, part 2 Jason Gunthorpe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).