linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "J. Bruce Fields" <bfields@fieldses.org>
To: Chuck Lever <chuck.lever@oracle.com>
Cc: Linux NFS Mailing List <linux-nfs@vger.kernel.org>
Subject: Re: nfsd: managing pages under network I/O
Date: Wed, 19 Oct 2016 15:26:02 -0400	[thread overview]
Message-ID: <20161019192602.GE23282@fieldses.org> (raw)
In-Reply-To: <4B1F71E8-8EA3-49E3-A303-93D9E6508A45@oracle.com>

On Wed, Oct 19, 2016 at 03:21:02PM -0400, Chuck Lever wrote:
> > On Oct 19, 2016, at 3:16 PM, J. Bruce Fields <bfields@fieldses.org> wrote:
> > I thought "moving pages around" here is basically just this, from
> > isvc_rdma_sendto.c:send_reply():
> > 
> > 	pages = rqstp->rq_next_page - rqstp->rq_respages;
> >        for (page_no = 0; page_no < pages; page_no++) {
> >                ctxt->pages[page_no+1] = rqstp->rq_respages[page_no];
> > 		...
> >                rqstp->rq_respages[page_no] = NULL;
> > 		...
> > 	}
> > 
> > So we're just copying an array of page pointers from one place to
> > another, and zeroing out the source array.
> > 
> > For a short reply that could be 1 page or even none.  In the worst case
> > (a 1MB read result) that could be 256 8-byte pointers, so 2K.
> > 
> > Am I missing something?  Has that up-to-2K operation been a problem?
> 
> Not a problem, but not optimal either. Like I said, I can put together
> some helpers so that this code is not duplicated, and the call-sites
> would be a little easier to understand.

Sure, I've no objection if you find some cleanup that makes sense.

--b.

      reply	other threads:[~2016-10-19 19:26 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-12 17:42 nfsd: managing pages under network I/O Chuck Lever
2016-10-13  6:35 ` Christoph Hellwig
2016-10-13 13:36   ` Chuck Lever
2016-10-13 14:32     ` Chuck Lever
2016-10-19 17:26 ` J. Bruce Fields
2016-10-19 18:28   ` Chuck Lever
2016-10-19 19:16     ` J. Bruce Fields
2016-10-19 19:21       ` Chuck Lever
2016-10-19 19:26         ` J. Bruce Fields [this message]

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=20161019192602.GE23282@fieldses.org \
    --to=bfields@fieldses.org \
    --cc=chuck.lever@oracle.com \
    --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 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).