Re: [PATCH v12 01/10] vfs, iomap: Fix generic_file_splice_read() to avoid reversion of ITER_PIPE

From: David Howells
Date: Thu Feb 09 2023 - 05:52:09 EST


Christoph Hellwig <hch@xxxxxxxxxxxxx> wrote:

> I defintively like the idea of killing ITER_PIPE. Isn't the 16
> folios in a folio tree often much less than what we could fit into
> a single pipe buf? Unless you have a file system that can use
> huge folios for buffered I/O and actually does this might significantly
> limit performance.

There's a loop there that repeats the filemap_get_pages() until either the
pipe is full or we hit EOF, the same as in filemap_read() (upon which this is
based).

I want to use filemap_get_pages() if I can as that does all the readahead
stuff. What might be nice, though, is if I could tell it to return rather
than waiting for a folio to come uptodate if it has already returned a folio
so that I can push the other side of the splice along whilst the read is in
progress.

David