Re: [PATCH 0/3] vmsplice: make vmsplice a trivial wrapper for preadv2/pwritev2

From: Andy Lutomirski

Date: Tue Jun 02 2026 - 23:53:08 EST


On Tue, Jun 2, 2026 at 5:12 PM Linus Torvalds
<torvalds@xxxxxxxxxxxxxxxxxxxx> wrote:
>
> On Tue, 2 Jun 2026 at 15:54, Askar Safin <safinaskar@xxxxxxxxx> wrote:
> >
> > Pedro is talking here not about this vmsplice patch, but about
> > my future hypothetical patch, which will remove splice-pagecache-to-pipe.
>
> That absolutely would be my suggested next step.
>
> Something like the attached - get rid of filemap_splice_read()
> entirely, and just replace it with copy_splice_read().

Am I understanding correctly that this will completely break zerocopy
sendfile? sendfile is, internally, splice-to-a-secret-per-task-pipe
and then splice to the socket. How much to people care? These days,
a lot of high-bandwidth network senders are sending encrypted data,
which is not zerocopy frompagecache. But there are surely some users
that care, for example the person who went to the effort to implement
IORING_OP_SPLICE:

commit 7d67af2c013402537385dae343a2d0f6a4cb3bfd
Author: Pavel Begunkov <asml.silence@xxxxxxxxx>
Date: Mon Feb 24 11:32:45 2020 +0300

io_uring: add splice(2) support

Now maybe someone cares about a different path? Splice from socket to
pipe to file? Splice from socket to pipe to other socket? Does
anyone do any of this? One can, of course, recv() directly to an
mmapped file, but then you pay for page faults, so that probably a bad
idea in most cases. At least all of these cases don't have spliced
buffers that refer to a potentially read-only file.


But I'm a little concerned that zerocopy sends from files to network
are actually important.

--Andy