Re: [PATCH 03/33] mm: Implement readahead_control pageset expansion

From: David Howells
Date: Thu Feb 18 2021 - 14:13:35 EST


Matthew Wilcox <willy@xxxxxxxxxxxxx> wrote:

> So readahead_expand() needs to adjust the file's f_ra so that when the
> application gets to 64kB, it kicks off the readahead of 4MB-8MB chunk (and
> then when we get to 4MB+256kB, it kicks off the readahead of 8MB-12MB,
> and so on).

Ummm... Two questions:

Firstly, how do I do that? Set ->async_size? And to what? The expansion
could be 2MB from a ceph stripe, 256k from the cache. Just to add to the fun,
the leading edge of the window might also be rounded downwards and the RA
trigger could be before where the app is going to start reading.

Secondly, what happens if, say, a 4MB read is covered by a single 4MB THP?

David