All of lore.kernel.org
 help / color / mirror / Atom feed
From: "J. Bruce Fields" <bfields@fieldses.org>
To: Christoph Hellwig <hch@infradead.org>
Cc: Anna Schumaker <Anna.Schumaker@netapp.com>, linux-nfs@vger.kernel.org
Subject: Re: [PATCH v2 2/4] NFSD: Add READ_PLUS support for data segments
Date: Fri, 6 Feb 2015 11:21:10 -0500	[thread overview]
Message-ID: <20150206162110.GC29783@fieldses.org> (raw)
In-Reply-To: <20150206160848.GA29783@fieldses.org>

On Fri, Feb 06, 2015 at 11:08:48AM -0500, J. Bruce Fields wrote:
> On Fri, Feb 06, 2015 at 03:54:56AM -0800, Christoph Hellwig wrote:
> > On Thu, Feb 05, 2015 at 11:43:46AM -0500, Anna Schumaker wrote:
> > > > The problem is that the typical case of all data won't use splice
> > > > every with your patches as the 4.2 client will always send a READ_PLUS.
> > > > 
> > > > So we'll have to find a way to use it where it helps.  While we might be
> > > > able to add some hacks to only use splice for the first segment I guess
> > > > we just need to make the splice support generic enough in the long run.
> > > > 
> > > 
> > > I should be able to use splice if I detect that we're only returning a single DATA segment easily enough.
> > 
> > You could also elect to never return more than one data segment as a
> > start:
> > 
> >    In all situations, the
> >    server may choose to return fewer bytes than specified by the client.
> >    The client needs to check for this condition and handle the
> >    condition appropriately.
> 
> Yeah, I think that was more-or-less what Anna's first attempt did and I
> said "what if that means more round trips"?  The client can't anticipate
> the short reads so it can't make up for this with parallelism.
> 
> > But doing any of these for a call that's really just an optimization
> > soudns odd.  I'd really like to see an evaluation of the READ_PLUS
> > impact on various workloads before offering it.
> 
> Yes, unfortunately I don't see a way to make this just an obvious win.

Actually, the other fallback is to return a single data segment, which
shouldn't be any worse than READ as long as the client assumes that's
the normal case.

So as a first pass another idea might be to return a hole *only* if it
covers the entire requested range and otherwise represent the result as
a single data segment?

(Or you could imagine various ways to make it more complicated: e.g.
also allow 1 data segment + 1 hole, also representable with an xdr buf
and without screwing up the client's alignment expectations.  Or allow
additional data segments if they're small enough that we think the
copying cost would be negligible.)

And turn off READ_PLUS over RDMA, but that seems like something that
should be fixed in the spec.

--b.

> 
> (Is there any way we could make it so with better protocol?  Maybe RDMA
> could help get the alignment right in multiple-segment cases?  But then
> I think there needs to be some sort of language about RDMA, or else
> we're stuck with:
> 
> 	https://tools.ietf.org/html/rfc5667#section-5
> 
> which I think forces us to return READ_PLUS data inline, another
> possible READ_PLUS regression.)
> 
> Anyway, ignoring RDMA, I guess the interesting questions to me are:
> 
> 	- How much does READ_PLUS actually help in the cases it was
> 	  meant to?  Perhaps create and age a VM image somehow, and then
> 	  time a read of the entire image?
> 	- What are the worst-case regressions?  Read a large file with a
> 	  lot of small holes and measure time and cpu usage?
> 
> --b.

  reply	other threads:[~2015-02-06 16:21 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-28 20:42 [PATCH v2 0/4] NFSD: Add READ_PLUS support Anna.Schumaker
2015-01-28 20:42 ` [PATCH v2 1/4] NFSD: nfsd4_encode_read() should encode eof and maxcount Anna.Schumaker
2015-02-05 14:11   ` Christoph Hellwig
2015-02-05 16:04     ` Anna Schumaker
2015-01-28 20:42 ` [PATCH v2 2/4] NFSD: Add READ_PLUS support for data segments Anna.Schumaker
2015-02-05 14:13   ` Christoph Hellwig
2015-02-05 16:06     ` Anna Schumaker
2015-02-05 16:23       ` Christoph Hellwig
2015-02-05 16:43         ` Anna Schumaker
2015-02-05 16:48           ` J. Bruce Fields
2015-02-05 16:53             ` Anna Schumaker
2015-02-06 22:00             ` Anna Schumaker
2015-02-11 16:04             ` Anna Schumaker
2015-02-11 16:13               ` Trond Myklebust
2015-02-11 16:22                 ` J. Bruce Fields
2015-02-11 16:31                   ` Trond Myklebust
2015-02-11 16:42                     ` J. Bruce Fields
2015-02-12 12:32                       ` Christoph Hellwig
     [not found]                     ` <OF7B254253.7A276767-ON88257DE9.005F1E53-88257DE9.0060F512@us.ibm.com>
2015-02-11 17:47                       ` Trond Myklebust
2015-02-11 18:17                         ` Tom Haynes
2015-02-11 18:49                           ` Trond Myklebust
2015-02-11 19:01                             ` Anna Schumaker
2015-02-11 19:22                   ` Anna Schumaker
2015-02-12 19:59                     ` Anna Schumaker
2015-02-13 13:24                       ` Christoph Hellwig
2015-02-13 14:12                       ` J. Bruce Fields
2015-02-12 12:29                 ` Christoph Hellwig
2015-02-06 11:54           ` Christoph Hellwig
2015-02-06 16:08             ` J. Bruce Fields
2015-02-06 16:21               ` J. Bruce Fields [this message]
2015-02-06 16:46               ` Chuck Lever
2015-02-06 17:04                 ` Chuck Lever
2015-02-06 17:59                   ` J. Bruce Fields
2015-02-06 18:44                     ` Chuck Lever
2015-02-06 19:35                       ` J. Bruce Fields
2015-02-06 20:07                         ` Chuck Lever
2015-02-06 20:28                           ` J. Bruce Fields
2015-02-06 21:12                             ` Chuck Lever
2015-02-06 22:01                               ` J. Bruce Fields
2015-02-05 16:47       ` J. Bruce Fields
2015-01-28 20:42 ` [PATCH v2 3/4] NFSD: Add READ_PLUS support for hole segments Anna.Schumaker
2015-01-28 20:42 ` [PATCH v2 4/4] NFSD: Add support for encoding multiple segments Anna.Schumaker
2015-01-28 21:38 ` [PATCH v2 0/4] NFSD: Add READ_PLUS support Christoph Hellwig
2015-01-28 21:45   ` Anna Schumaker
2015-01-29 16:49     ` Anna Schumaker

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=20150206162110.GC29783@fieldses.org \
    --to=bfields@fieldses.org \
    --cc=Anna.Schumaker@netapp.com \
    --cc=hch@infradead.org \
    --cc=linux-nfs@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 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.