From: "J. Bruce Fields" <bfields@fieldses.org>
To: Sandeep Joshi <sanjos100@gmail.com>
Cc: Tom Talpey <tom@talpey.com>, linux-nfs@vger.kernel.org
Subject: Re: why does nfsd write not use splice
Date: Wed, 12 Jun 2013 12:46:37 -0400 [thread overview]
Message-ID: <20130612164637.GA6868@fieldses.org> (raw)
In-Reply-To: <CAEfL3KkdjB7bzvnfiDh024kHjCH0e64iH6GK6y+A+bpH3kUgJg@mail.gmail.com>
On Wed, Jun 12, 2013 at 09:51:09PM +0530, Sandeep Joshi wrote:
> Splice can be implemented independent of RDMA. It is supposed to transfer
> pages between two file descriptors. I found some postings on lkml from
> 2006 where Linus says it is quite possible to splice from a socket to a
> file.
>
> See the paragraph:
> " For filesystems, splice support tends to be really easy (both read and
> write). For other things, it depends a bit. But unlike sendfile(), it
> really is quite possible to splice _from_ a socket too, not just _to_ a
> socket. But no, that case hasn't been written yet."
> http://yarchive.net/comp/linux/splice.html
>
> Larry McVoy's 1997 proposal for adding splice support to the kernel can be
> read at ftp.tux.org/pub/sites/ftp.bitmover.com/pub/*splice*.*ps*.gz<http://ftp.tux.org/pub/sites/ftp.bitmover.com/pub/splice.ps.gz>
>
> Perhaps I should have opened this thread on lkml to determine if splice
> from socket to file is still feasible..
Right, the thing is, nfsd reads the rpc request from the socket into its
own buffers before it parses it. If you want to move the data directly
out of the network buffers into the page cache, then you have to know at
what point the write data starts in the request--which I believe will
mean doing the xdr parsing (and gss decryption if necessary) as the
request comes in off the wire.
That sounds like a lot of work and even if you have someone willing to
do the work they'd also need to justify that it's worth it.
RDMA may have some protocol support that simplifies this, I don't know.
--b.
next prev parent reply other threads:[~2013-06-12 16:46 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-09 7:35 why does nfsd write not use splice Sandeep Joshi
2013-06-11 19:51 ` J. Bruce Fields
2013-06-12 2:36 ` Tom Talpey
2013-06-12 15:39 ` J. Bruce Fields
2013-06-12 16:22 ` Sandeep Joshi
[not found] ` <CAEfL3KkdjB7bzvnfiDh024kHjCH0e64iH6GK6y+A+bpH3kUgJg@mail.gmail.com>
2013-06-12 16:46 ` J. Bruce Fields [this message]
2013-06-14 12:09 ` Sandeep Joshi
2013-06-14 19:22 ` Jeff Layton
2013-06-15 5:09 ` Myklebust, Trond
2013-06-17 11:01 ` Jeff Layton
2013-06-17 11:48 ` Myklebust, Trond
2013-06-17 14:34 ` J. Bruce Fields
2013-06-17 14:36 ` Myklebust, Trond
2013-06-17 14:48 ` J. Bruce Fields
2013-06-18 12:17 ` Jeff Layton
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=20130612164637.GA6868@fieldses.org \
--to=bfields@fieldses.org \
--cc=linux-nfs@vger.kernel.org \
--cc=sanjos100@gmail.com \
--cc=tom@talpey.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.