On Mon, Jun 17, 2013 at 02:36:20PM +0000, Myklebust, Trond wrote: > > -----Original Message----- > > From: J. Bruce Fields [mailto:bfields@xxxxxxxxxxxx] > > Sent: Monday, June 17, 2013 10:34 AM > > To: Myklebust, Trond > > Cc: Jeff Layton; Sandeep Joshi; linux-nfs@xxxxxxxxxxxxxxx > > 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@xxxxxxxxxx> 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. -- To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html