From: Christian Brauner <brauner@kernel.org>
To: Ryan Roberts <ryan.roberts@arm.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
"Matthew Wilcox (Oracle)" <willy@infradead.org>,
Alexander Viro <viro@zeniv.linux.org.uk>,
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>,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org,
linux-mm@kvack.org
Subject: Re: [PATCH v5 3/5] mm/readahead: Make space in struct file_ra_state
Date: Wed, 11 Jun 2025 11:57:32 +0200 [thread overview]
Message-ID: <20250611-mitleid-ablief-1e7f1f03394d@brauner> (raw)
In-Reply-To: <20250609092729.274960-4-ryan.roberts@arm.com>
On Mon, Jun 09, 2025 at 10:27:25AM +0100, Ryan Roberts wrote:
> We need to be able to store the preferred folio order associated with a
> readahead request in the struct file_ra_state so that we can more
> accurately increase the order across subsequent readahead requests. But
> struct file_ra_state is per-struct file, so we don't really want to
> increase it's size.
>
> mmap_miss is currently 32 bits but it is only counted up to 10 *
> MMAP_LOTSAMISS, which is currently defined as 1000. So 16 bits should be
> plenty. Redefine it to unsigned short, making room for order as unsigned
> short in follow up commit.
>
> Acked-by: David Hildenbrand <david@redhat.com>
> Reviewed-by: Jan Kara <jack@suse.cz>
> Signed-off-by: Ryan Roberts <ryan.roberts@arm.com>
> ---
> include/linux/fs.h | 2 +-
> mm/filemap.c | 11 ++++++-----
> 2 files changed, 7 insertions(+), 6 deletions(-)
>
> diff --git a/include/linux/fs.h b/include/linux/fs.h
> index 05abdabe9db7..87e7d5790e43 100644
> --- a/include/linux/fs.h
> +++ b/include/linux/fs.h
> @@ -1052,7 +1052,7 @@ struct file_ra_state {
> unsigned int size;
> unsigned int async_size;
> unsigned int ra_pages;
> - unsigned int mmap_miss;
> + unsigned short mmap_miss;
Thanks for not making struct file grow!
next prev parent reply other threads:[~2025-06-11 9:57 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-09 9:27 [PATCH v5 0/5] Readahead tweaks for larger folios Ryan Roberts
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 [this message]
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=20250611-mitleid-ablief-1e7f1f03394d@brauner \
--to=brauner@kernel.org \
--cc=akpm@linux-foundation.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=ryan.roberts@arm.com \
--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).