From: Ryan Roberts <ryan.roberts@arm.com>
To: Andrew Morton <akpm@linux-foundation.org>,
"Matthew Wilcox (Oracle)" <willy@infradead.org>,
Alexander Viro <viro@zeniv.linux.org.uk>,
Christian Brauner <brauner@kernel.org>, Jan Kara <jack@suse.cz>,
David Hildenbrand <david@redhat.com>,
Dave Chinner <david@fromorbit.com>,
Catalin Marinas <catalin.marinas@arm.com>,
Will Deacon <will@kernel.org>,
Kalesh Singh <kaleshsingh@google.com>, Zi Yan <ziy@nvidia.com>
Cc: Ryan Roberts <ryan.roberts@arm.com>,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org,
linux-mm@kvack.org
Subject: [PATCH v5 0/5] Readahead tweaks for larger folios
Date: Mon, 9 Jun 2025 10:27:22 +0100 [thread overview]
Message-ID: <20250609092729.274960-1-ryan.roberts@arm.com> (raw)
Hi All,
This 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.
Originally the series focussed on the latter part only (large folios for text).
See [3]. But after discussion with Matthew Wilcox, v4 switched to additionally
fix 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've run a number of benchmarks and observed no regressions. mm selftests also
shows no regressions vs mm-unstable. Selected benchmark results are presented in
the commit log for the final patch.
Most patches have R-b/A-b now so would be good to get into linux-next for some
soak testing when possible.
Applies on top of today's mm-unstable (a32230de8810).
Changes since v4 [4]
====================
- Added R-b/A-b (thanks all!)
- Patch 1:
- Removed ra->size fallback check in page_cache_ra_order() (Pankaj)
- Patch 2:
- Modify ra end alignment to handle non-power-of-2 optimal ra sizes (Jan)
- Patch 4:
- Only reset order to 0 if fallback is due to not supporting large folios
(Jan)
- Patch 5:
- Ignore VM_RAND_READ for VM_EXEC mappings in favour of following the new
VM_EXEC code path since code is always random (Will)
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/
[4] https://lore.kernel.org/linux-mm/20250430145920.3748738-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 | 62 ++++++++++++++++++++++++--------
mm/internal.h | 3 +-
mm/readahead.c | 36 ++++++++++---------
6 files changed, 89 insertions(+), 35 deletions(-)
--
2.43.0
next reply other threads:[~2025-06-09 9:27 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-09 9:27 Ryan Roberts [this message]
2025-06-09 9:27 ` [PATCH v5 1/5] mm/readahead: Honour new_order in page_cache_ra_order() Ryan Roberts
2025-06-09 9:27 ` [PATCH v5 2/5] mm/readahead: Terminate async readahead on natural boundary Ryan Roberts
2025-06-09 9:27 ` [PATCH v5 3/5] mm/readahead: Make space in struct file_ra_state Ryan Roberts
2025-06-11 9:57 ` Christian Brauner
2025-06-09 9:27 ` [PATCH v5 4/5] mm/readahead: Store folio order " Ryan Roberts
2025-06-12 11:37 ` Jan Kara
2025-06-09 9:27 ` [PATCH v5 5/5] mm/filemap: Allow arch to request folio size for exec memory Ryan Roberts
2025-06-19 11:07 ` Ryan Roberts
2025-07-11 15:41 ` Tao Xu
2025-07-14 8:19 ` Ryan Roberts
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250609092729.274960-1-ryan.roberts@arm.com \
--to=ryan.roberts@arm.com \
--cc=akpm@linux-foundation.org \
--cc=brauner@kernel.org \
--cc=catalin.marinas@arm.com \
--cc=david@fromorbit.com \
--cc=david@redhat.com \
--cc=jack@suse.cz \
--cc=kaleshsingh@google.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=viro@zeniv.linux.org.uk \
--cc=will@kernel.org \
--cc=willy@infradead.org \
--cc=ziy@nvidia.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).