linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC PATCH v4 0/5] Readahead tweaks for larger folios
@ 2025-04-30 14:59 Ryan Roberts
  2025-04-30 14:59 ` [RFC PATCH v4 1/5] mm/readahead: Honour new_order in page_cache_ra_order() Ryan Roberts
                   ` (5 more replies)
  0 siblings, 6 replies; 40+ messages in thread
From: Ryan Roberts @ 2025-04-30 14:59 UTC (permalink / raw)
  To: Andrew Morton, Matthew Wilcox (Oracle), Alexander Viro,
	Christian Brauner, Jan Kara, David Hildenbrand, Dave Chinner,
	Catalin Marinas, Will Deacon, Kalesh Singh, Zi Yan
  Cc: Ryan Roberts, linux-arm-kernel, linux-kernel, linux-fsdevel,
	linux-mm

Hi All,

This RFC series adds some tweaks to readahead so that it does a better job of
ramping up folio sizes as readahead extends further into the file. And it
additionally special-cases executable mappings to allow the arch to request a
preferred folio size for text.

Previous versions of the series focussed on the latter part only (large folios
for text). See [3]. But after discussion with Matthew Wilcox last week, we
decided that we should really be fixing some of the unintended behaviours in how
a folio size is selected in general before special-casing for text. As a result
patches 1-4 make folio size selection behave more sanely, then patch 5
introduces large folios for text. Patch 5 depends on patch 1, but does not
depend on patches 2-4.

---

I'm leaving this marked as RFC for now as I intend to do more testing, and
haven't yet updated the benchmark results in patch 5 (although I expect them to
be similar).

Applies on top of Monday's mm-unstable (b18dec6a6ad3) and passes all mm
kselftests.

Changes since v3 [3]
====================

 - Added patchs 1-4 to do better job of ramping up folio order
 - In patch 5:
   - Confine readahead blocks to vma boundaries (per Kalesh)
   - Rename arch_exec_folio_order() to exec_folio_order() (per Matthew)
   - exec_folio_order() now returns unsigned int and defaults to order-0
     (per Matthew)
   - readahead size is honoured (including when disabled)

Changes since v2 [2]
====================

 - Rename arch_wants_exec_folio_order() to arch_exec_folio_order() (per Andrew)
 - Fixed some typos (per Andrew)

Changes since v1 [1]
====================

 - Remove "void" from arch_wants_exec_folio_order() macro args list

[1] https://lore.kernel.org/linux-mm/20240111154106.3692206-1-ryan.roberts@arm.com/
[2] https://lore.kernel.org/all/20240215154059.2863126-1-ryan.roberts@arm.com/
[3] https://lore.kernel.org/linux-mm/20250327160700.1147155-1-ryan.roberts@arm.com/

Thanks,
Ryan

Ryan Roberts (5):
  mm/readahead: Honour new_order in page_cache_ra_order()
  mm/readahead: Terminate async readahead on natural boundary
  mm/readahead: Make space in struct file_ra_state
  mm/readahead: Store folio order in struct file_ra_state
  mm/filemap: Allow arch to request folio size for exec memory

 arch/arm64/include/asm/pgtable.h |  8 +++++
 include/linux/fs.h               |  4 ++-
 include/linux/pgtable.h          | 11 +++++++
 mm/filemap.c                     | 55 ++++++++++++++++++++++++--------
 mm/internal.h                    |  3 +-
 mm/readahead.c                   | 27 +++++++++-------
 6 files changed, 81 insertions(+), 27 deletions(-)

--
2.43.0


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

end of thread, other threads:[~2025-05-14 15:31 UTC | newest]

Thread overview: 40+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-30 14:59 [RFC PATCH v4 0/5] Readahead tweaks for larger folios Ryan Roberts
2025-04-30 14:59 ` [RFC PATCH v4 1/5] mm/readahead: Honour new_order in page_cache_ra_order() Ryan Roberts
2025-05-05  8:49   ` Jan Kara
2025-05-05  9:51   ` David Hildenbrand
2025-05-05 10:09     ` Jan Kara
2025-05-05 10:25       ` David Hildenbrand
2025-05-05 12:51         ` Ryan Roberts
2025-05-05 16:14           ` Jan Kara
2025-05-05 10:09   ` Anshuman Khandual
2025-05-05 13:00     ` Ryan Roberts
2025-05-08 12:55   ` Pankaj Raghav (Samsung)
2025-05-09 13:30     ` Ryan Roberts
2025-05-09 20:50       ` Pankaj Raghav (Samsung)
2025-05-13 12:33         ` Ryan Roberts
2025-05-13  6:19   ` Chaitanya S Prakash
2025-04-30 14:59 ` [RFC PATCH v4 2/5] mm/readahead: Terminate async readahead on natural boundary Ryan Roberts
2025-05-05  9:13   ` Jan Kara
2025-05-05  9:37     ` Jan Kara
2025-05-06  9:28       ` Ryan Roberts
2025-05-06 11:29         ` Jan Kara
2025-05-06 15:31           ` Ryan Roberts
2025-04-30 14:59 ` [RFC PATCH v4 3/5] mm/readahead: Make space in struct file_ra_state Ryan Roberts
2025-05-05  9:39   ` Jan Kara
2025-05-05  9:57   ` David Hildenbrand
2025-05-09 10:00   ` Pankaj Raghav (Samsung)
2025-04-30 14:59 ` [RFC PATCH v4 4/5] mm/readahead: Store folio order " Ryan Roberts
2025-05-05  9:52   ` Jan Kara
2025-05-06  9:53     ` Ryan Roberts
2025-05-06 10:45       ` Jan Kara
2025-05-05 10:08   ` David Hildenbrand
2025-05-06 10:03     ` Ryan Roberts
2025-05-06 14:24       ` David Hildenbrand
2025-05-06 15:06         ` Ryan Roberts
2025-04-30 14:59 ` [RFC PATCH v4 5/5] mm/filemap: Allow arch to request folio size for exec memory Ryan Roberts
2025-05-05 10:06   ` Jan Kara
2025-05-09 13:52   ` Will Deacon
2025-05-13 12:46     ` Ryan Roberts
2025-05-14 15:14       ` Will Deacon
2025-05-14 15:31         ` Ryan Roberts
2025-05-06 10:05 ` [RFC PATCH v4 0/5] Readahead tweaks for larger folios Ryan Roberts

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