[PATCH 10/26] netfs: Bulk load the readahead-provided folios up front
Paulo Alcantara
pc at manguebit.org
Sat Mar 28 11:36:29 PDT 2026
David Howells <dhowells at redhat.com> writes:
> Load all the folios by the VM for readahead up front into the folio queue.
> With the number of folios provided by the VM, the folio queue can be fully
> allocated first and then the loading happen in one go inside the RCU read
> lock. The folio refs acquired from readahead are dropped in bulk once the
> first subrequest is dispatched as it's quite a slow operation.
>
> This simplifies the buffer handling later and isn't noticeably slower as
> the xarray doesn't need to be modified and the folios are all already
> pre-locked.
>
> Signed-off-by: David Howells <dhowells at redhat.com>
> cc: Paulo Alcantara <pc at manguebit.org>
> cc: Matthew Wilcox <willy at infradead.org>
> cc: netfs at lists.linux.dev
> cc: linux-mm at kvack.org
> cc: linux-fsdevel at vger.kernel.org
> ---
> fs/netfs/buffered_read.c | 95 +++++++++++++++++++++-------------
> fs/netfs/rolling_buffer.c | 75 +++++++++++++++++++++++++++
> include/linux/netfs.h | 1 +
> include/linux/rolling_buffer.h | 3 ++
> include/trace/events/netfs.h | 1 +
> 5 files changed, 138 insertions(+), 37 deletions(-)
Reviewed-by: Paulo Alcantara (Red Hat) <pc at manguebit.org>
More information about the linux-afs
mailing list