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@xxxxxxxxxx> > Reviewed-by: Jan Kara <jack@xxxxxxx> > Signed-off-by: Ryan Roberts <ryan.roberts@xxxxxxx> > --- > 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!