Re: [PATCH 10/26] netfs: Bulk load the readahead-provided folios up front
Paulo Alcantara <[email protected]> Sat, 28 Mar 2026 15:36:29 -0300
| Newsgroups | dev.linux.lists.v9fs,dev.linux.lists.netfs,org.kernel.vger.ceph-devel,org.kernel.vger.linux-cifs,org.kernel.vger.linux-fsdevel,org.kernel.vger.linux-kernel,org.kernel.vger.linux-nfs,org.kvack.linux-mm,org.ozlabs.lists.linux-erofs |
|---|---|
| Message-ID | <[email protected]> |
David Howells <[email protected]> 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 <[email protected]> > cc: Paulo Alcantara <[email protected]> > cc: Matthew Wilcox <[email protected]> > cc: [email protected] > cc: [email protected] > cc: [email protected] > --- > 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) <[email protected]>