Batched page table updates for file-backed large folios
Get series with b4
b4 am [email protected]Versions newest first
- v5 Latest5 patches 4 repliesIn review
v4 from the cover letter
- 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()
Patches in v5 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/5 | filemap: Add filemap_map_folio_range()mm/ | +54 | 0 replies | |
| 2/5 | mm: Add generic set_ptes()include/ | +27 | 4 replies | |
| 3/5 | rmap: add folio_add_file_rmap_range()include/ mm/ | +48 | 0 replies | |
| 4/5 | mm: Convert do_set_pte() to set_pte_range()Documentation/ include/ mm/ +1 more | +23 | 0 replies | |
| 5/5 | filemap: Batch PTE mappingsmm/ | +25 | 0 replies |
Reviews trailers per patch
None of the 5 patches has a Reviewed-by or Acked-by.
| Patch | Yin Fengwei |
|---|---|
| 1/5 | |
| 2/5 | T-b |
| 3/5 | |
| 4/5 | |
| 5/5 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v5 0/5] Batched page table updates for file-backed large folios
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(-)
Signature · 1 line
2.35.1