[RFC PATCH 0/2] Use high-order folios in mmap sync RA
From: Anatoly Stepanov
Date: Wed Apr 15 2026 - 07:47:10 EST
When "fault around" is enabled, 0-order folios might significantly
slowdown filemap_map_pages().
For example when async RA won't be able to start,
we might end up with a large mmap'ed file with 0-orders.
Imagine an access pattern, when we
just access file chunk-by-chunk, where each chunk size equals to RA window,
until every chunk of the file gets loaded into the page cache.
In this case, we never touch RA-marked page, thus async RA wouldn't kick
in, ending with 0-orders covering all the file.
Let's resolve this by starting sync RA with high-order.
(procfs smaps patch is just for showing contpte coverage improvement for arm64)
Based on linux-7.0-rc5
Anatoly Stepanov (2):
procfs: add contpte info into smaps
filemap: use high-order folios in filemap sync RA
fs/proc/task_mmu.c | 20 +++++++++++++++++---
include/linux/pagemap.h | 1 +
mm/filemap.c | 1 +
mm/internal.h | 1 +
mm/memory.c | 2 +-
mm/readahead.c | 5 +++--
6 files changed, 24 insertions(+), 6 deletions(-)
--
2.34.1