From: Al Viro <viro@ZenIV.linux.org.uk>
To: Christoph Hellwig <hch@infradead.org>
Cc: Miklos Szeredi <miklos@szeredi.hu>,
linux-fsdevel@vger.kernel.org, netdev@vger.kernel.org
Subject: Re: getting rid of ->splice_write?
Date: Wed, 5 Nov 2014 18:49:45 +0000 [thread overview]
Message-ID: <20141105184945.GS7996@ZenIV.linux.org.uk> (raw)
In-Reply-To: <20140922173053.GA13109@infradead.org>
On Mon, Sep 22, 2014 at 10:30:53AM -0700, Christoph Hellwig wrote:
> Currently only /dev/null, fusedev and the socket code have a
> splice_write implementation that isn't iter_file_splice_write, and
> it seems like these three could easily be switched over if they
> implemented a ->write_iter.
Not really. A minor nitpick is that you've missed port_fops_splice_write(),
but the real bitch isn't that and not even the sockets (see the fun with
iov_iter sendmsg/recvmsg work getting resurrected). It's that NULL
->splice_write() means default_file_splice_write. IOW, you'd need either
->write_iter() for _everything_ (with support of bvec-backed ones included,
since that's what iter_file_splice_write() will feed to ->write_iter()),
or you need to have do_splice_from() check if ->write_iter is NULL and
go for default_file_splice_write() instead of iter_file_splice_write().
The latter might be doable, but the former is really over the top - for
that we'd need to touch every driver instance of ->write() out there.
You want to do that, it's your funeral...
> Similarly it seems to be like we could kill ->splice_read by
> implementing an equivalent iteration over ->read_iter.
Hard to do. I agree that we want to, but it'll take quite a bit of work
on iov_iter primitives, I'm afraid. At the very least, we want a variant
of iov_iter that could steal pages. Don't forget that a large part of
the rationale behind splice_read was the ability to play zero-copy games.
I'm not sure if it will happen this cycle; there's more than enough fun
on the net/* side. _If_ that ends up done faster than I expect it to be,
->splice_read() is the obvious next target.
next prev parent reply other threads:[~2014-11-05 18:49 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-22 17:30 getting rid of ->splice_write? Christoph Hellwig
2014-11-05 18:49 ` Al Viro [this message]
2014-11-06 7:55 ` Christoph Hellwig
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20141105184945.GS7996@ZenIV.linux.org.uk \
--to=viro@zeniv.linux.org.uk \
--cc=hch@infradead.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=miklos@szeredi.hu \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).