linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v5 0/5] Batched page table updates for file-backed large folios
@ 2023-02-07 19:49 Matthew Wilcox (Oracle)
  2023-02-07 19:49 ` [PATCH v5 1/5] filemap: Add filemap_map_folio_range() Matthew Wilcox (Oracle)
                   ` (4 more replies)
  0 siblings, 5 replies; 12+ messages in thread
From: Matthew Wilcox (Oracle) @ 2023-02-07 19:49 UTC (permalink / raw)
  To: Yin Fengwei, linux-mm
  Cc: Matthew Wilcox (Oracle), david, dave.hansen, tim.c.chen,
	ying.huang

On page fault, filemap_map_pages() already retrieves a folio from the page
cache and iterates over it, which realised some savings.  This patch series
drives that further down by allowing filemap to tell the MM to map a
contiguous range of pages in the folio.  This improves performance by
batching the updates to the folio's refcount and the rmap counters.

Testing with a micro benchmark like will-it-scale.pagefault on a
48C/96T IceLake box showed:
   - batched rmap brings around 15% performance gain
   - batched refcount brings around 2% performance gain

v4:
 - Add the set_ptes() architecture interface
 - Change various interfaces to take (folio, struct page *, nr) instead of
   (folio, unsigned long start, nr)
 - Remove do_set_pte() instead of keeping a compat interface
 - Add a check in set_pte_range() to ensure that large anon folios are not
   being passed in yet (David Hildenbrand)
 - Save / restore the old vmf->pte pointer instead of passing a different
   pte pointer to set_pte_range()

Matthew Wilcox (Oracle) (1):
  mm: Add generic set_ptes()

Yin Fengwei (4):
  filemap: Add filemap_map_folio_range()
  rmap: add folio_add_file_rmap_range()
  mm: Convert do_set_pte() to set_pte_range()
  filemap: Batch PTE mappings

 Documentation/filesystems/locking.rst |   2 +-
 include/linux/mm.h                    |   3 +-
 include/linux/pgtable.h               |  27 +++++++
 include/linux/rmap.h                  |   2 +
 mm/filemap.c                          | 111 ++++++++++++++++----------
 mm/memory.c                           |  31 ++++---
 mm/rmap.c                             |  60 ++++++++++----
 7 files changed, 164 insertions(+), 72 deletions(-)

-- 
2.35.1



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

end of thread, other threads:[~2023-02-09  8:11 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-02-07 19:49 [PATCH v5 0/5] Batched page table updates for file-backed large folios Matthew Wilcox (Oracle)
2023-02-07 19:49 ` [PATCH v5 1/5] filemap: Add filemap_map_folio_range() Matthew Wilcox (Oracle)
2023-02-07 19:49 ` [PATCH v5 2/5] mm: Add generic set_ptes() Matthew Wilcox (Oracle)
2023-02-08  0:48   ` kernel test robot
2023-02-08  2:20   ` kernel test robot
2023-02-08  4:57   ` Yin Fengwei
2023-02-08  8:38   ` Kirill A. Shutemov
2023-02-08 18:14     ` Matthew Wilcox
2023-02-09  8:11       ` Kirill A. Shutemov
2023-02-07 19:49 ` [PATCH v5 3/5] rmap: add folio_add_file_rmap_range() Matthew Wilcox (Oracle)
2023-02-07 19:49 ` [PATCH v5 4/5] mm: Convert do_set_pte() to set_pte_range() Matthew Wilcox (Oracle)
2023-02-07 19:49 ` [PATCH v5 5/5] filemap: Batch PTE mappings Matthew Wilcox (Oracle)

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).