summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorRyan Roberts <ryan.roberts@arm.com>2025-06-09 12:27:25 +0300
committerAndrew Morton <akpm@linux-foundation.org>2025-07-10 08:42:03 +0300
commitf5e8b140cd1324cf2c9c17487b8f444098624797 (patch)
tree5e7f9b614324c75276f51098af09fdc4726e8b05 /include/linux
parent18ebe55a9236b33d519fcc8669730cd02386a2dc (diff)
downloadlinux-f5e8b140cd1324cf2c9c17487b8f444098624797.tar.xz
mm/readahead: make space in struct file_ra_state
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. Link: https://lkml.kernel.org/r/20250609092729.274960-4-ryan.roberts@arm.com Signed-off-by: Ryan Roberts <ryan.roberts@arm.com> Acked-by: David Hildenbrand <david@redhat.com> Reviewed-by: Jan Kara <jack@suse.cz> Cc: Chaitanya S Prakash <chaitanyas.prakash@arm.com> Cc: Will Deacon <will@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/fs.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 62634af97da6..ef819b232d66 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -1054,7 +1054,7 @@ struct file_ra_state {
unsigned int size;
unsigned int async_size;
unsigned int ra_pages;
- unsigned int mmap_miss;
+ unsigned short mmap_miss;
loff_t prev_pos;
};