Re: [RFC PATCH v4 3/5] mm/readahead: Make space in struct file_ra_state

From: David Hildenbrand
Date: Mon May 05 2025 - 05:57:55 EST


On 30.04.25 16:59, 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.

Makes sense and LGTM

Acked-by: David Hildenbrand <david@xxxxxxxxxx>

--
Cheers,

David / dhildenb