Skip to content

Enabling large folios for 5.17

Matthew Wilcox (Oracle) linux-fsdevel linux-mm lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest12 patches 7 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/12mm: Add folio_put_refs()include/linux/mm.h+20 -00 replies
2/12filemap: Use folio_put_refs() in filemap_free_folio()mm/filemap.c+4 -62 replies
3/12filemap: Allow large folios to be added to the page cachemm/filemap.c+22 -170 replies
4/12mm/vmscan: Free non-shmem folios without splitting themmm/vmscan.c+2 -23 replies
5/12mm: Fix READ_ONLY_THP warninginclude/linux/pagemap.h+2 -20 replies
6/12mm/vmscan: Optimise shrink_page_list for non-PMD-sized foliosmm/vmscan.c+2 -10 replies
7/12mm: Make large folios depend on THPinclude/linux/pagemap.h+6 -10 replies
8/12mm/readahead: Add large folio readaheadmm/readahead.c+99 -70 replies
9/12mm/readahead: Align file mappings for non-DAXmm/huge_memory.c+1 -42 replies
10/12mm/readahead: Switch to page_cache_ra_ordermm/filemap.c mm/internal.h mm/readahead.c+5 -50 replies
11/12mm/filemap: Support VM_HUGEPAGE for file mappingsmm/filemap.c+18 -00 replies
12/12selftests/vm/transhuge-stress: Support file-backed PMD foliostools/testing/selftests/vm/transhuge-stress.c+24 -110 replies

Reviews trailers per patch

1 of 12 patches has a Reviewed-by or Acked-by.

PatchChristoph HellwigJohn HubbardJason GunthorpeWilliam Kucharski
1/12R-b R-b R-b R-b
2/12
3/12
4/12
5/12
6/12
7/12
8/12
9/12
10/12
11/12
12/12

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

Read the v1 thread

Cover letter [PATCH 00/12] Enabling large folios for 5.17

Is Linux just too stable for you? Tired of not having your data eaten by a grue? Then it's time to experiment with enabling large folios!

You will need:
- A recent Linus tree (I used a33f5c380c4b)
- To enable CONFIG_TRANSPARENT_HUGEPAGE
- An XFS filesystem
- Your favourite workload

These patches create large folios in the readahead and fault paths. They do not create large folios in the write path; that is future work. For most workloads, this is quite sufficient. You can monitor the sizes of folios being added to the page cache with the mm_filemap_add_to_page_cache tracepoint.

As mentioned in the 'Add large folio readahead' commit message, the heuristic for deciding when to enlarge the size of the folio being created is stupid. I'm sure somebody out there can do better.

This patchset is not (as far as I'm concerned) a candidate for merging into 5.17. It hasn't been in linux-next, and while it does not introduce any regressions in my testing, I'd be uncomfortable seeing it merged before 5.18.

Matthew Wilcox (Oracle) (11):
mm: Add folio_put_refs()
filemap: Use folio_put_refs() in filemap_free_folio()
filemap: Allow large folios to be added to the page cache mm/vmscan: Free non-shmem folios without splitting them
mm: Fix READ_ONLY_THP warning
mm/vmscan: Optimise shrink_page_list for non-PMD-sized folios
mm: Make large folios depend on THP
mm/readahead: Add large folio readahead mm/readahead: Switch to page_cache_ra_order mm/filemap: Support VM_HUGEPAGE for file mappings selftests/vm/transhuge-stress: Support file-backed PMD folios

William Kucharski (1):
mm/readahead: Align file mappings for non-DAX

 include/linux/mm.h                            |  20 ++++
 include/linux/pagemap.h                       |  11 +-
 mm/filemap.c                                  |  69 +++++++----
 mm/huge_memory.c                              |   5 +-
 mm/internal.h                                 |   4 +-
 mm/readahead.c                                | 108 ++++++++++++++++--
 mm/vmscan.c                                   |   7 +-
 tools/testing/selftests/vm/transhuge-stress.c |  35 ++++--
 8 files changed, 204 insertions(+), 55 deletions(-)
Signature · 1 line
2.34.1