From: "J. Bruce Fields" <bfields@fieldses.org>
To: "Myklebust, Trond" <Trond.Myklebust@netapp.com>
Cc: Jeff Layton <jlayton@redhat.com>,
Sandeep Joshi <sanjos100@gmail.com>,
"linux-nfs@vger.kernel.org" <linux-nfs@vger.kernel.org>
Subject: Re: why does nfsd write not use splice
Date: Mon, 17 Jun 2013 10:48:07 -0400 [thread overview]
Message-ID: <20130617144807.GB27193@fieldses.org> (raw)
In-Reply-To: <4FA345DA4F4AE44899BD2B03EEEC2FA93F4144ED@SACEXCMBX04-PRD.hq.netapp.com>
On Mon, Jun 17, 2013 at 02:36:20PM +0000, Myklebust, Trond wrote:
> > -----Original Message-----
> > From: J. Bruce Fields [mailto:bfields@fieldses.org]
> > Sent: Monday, June 17, 2013 10:34 AM
> > To: Myklebust, Trond
> > Cc: Jeff Layton; Sandeep Joshi; linux-nfs@vger.kernel.org
> > Subject: Re: why does nfsd write not use splice
> >
> > On Mon, Jun 17, 2013 at 11:48:18AM +0000, Myklebust, Trond wrote:
> > >
> > > On Jun 17, 2013, at 7:01 AM, Jeff Layton <jlayton@redhat.com> wrote:
> > > > Encryption certainly can be a problem, but integrity isn't
> > > > necessarily one.
> > > >
> > > > Basically the idea would be to receive the data off the socket into
> > > > a set of pages and then splice those into the correct spot in the
> > > > local file. In both the privacy and integrity cases, you just have
> > > > an extra step in between. Privacy *may* mean an extra copy too
> > > > (though some of the crypto routines can decrypt data in place), but
> > > > handling integrity shouldn't.
> > > >
> > > > The tricky parts (I think) are determining how to lay out the
> > > > received data into the pages you eventually want to splice into the
> > > > file before you receive that data in, and how to deal with it when
> > > > the WRITE doesn't cover an entire page.
> > >
> > > Once you've copied the data one time, most of the advantage of
> > > splice() is gone, since a copy will then exist in processor cache
> > > memory and can be duplicated quickly.
> >
> > Well, worst case you could turn it off in krb5i/krb5p cases and maybe still get
> > some benefit in the auth_sys case?
> >
>
> Not if you need to copy in order to realign the data anyway...
Right, so you get to rewrite the xdr code so that it can process at
least some part of the compound as it comes in. Fun!
That's why I say it could take a lot of work even to get a prototype
sufficient to measure the effect of splice. Though maybe you could find
some simple heuristic that would predict the offset of write data when
using your particular test setup....
--b.
next prev parent reply other threads:[~2013-06-17 14:48 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
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 [this message]
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=20130617144807.GB27193@fieldses.org \
--to=bfields@fieldses.org \
--cc=Trond.Myklebust@netapp.com \
--cc=jlayton@redhat.com \
--cc=linux-nfs@vger.kernel.org \
--cc=sanjos100@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox