Linux NFS development
 help / color / mirror / Atom feed
From: Anna Schumaker <anna@kernel.org>
To: linux-nfs@vger.kernel.org, trond.myklebust@hammerspace.com
Cc: anna@kernel.org
Subject: [PATCH v3 0/5] NFS: Improvements for the NFSv4.2 READ_PLUS operation
Date: Thu, 21 Jul 2022 14:21:30 -0400	[thread overview]
Message-ID: <20220721182135.1885071-1-anna@kernel.org> (raw)

From: Anna Schumaker <Anna.Schumaker@Netapp.com>

Previously, decoding was a one step process that expanded holes as they
were seen in the buffer. This had a few undesireable side effects:

1) An extra READ_PLUS call was often needed to fetch any data shifted
   off the end of the buffer when the last two segments are a HOLE
   followed by DATA
2) We shifted the entire remaining buffer for each hole, meaning some
   segments would get moved multiple times during one decode pass.

These patches attempt to address this by turning READ_PLUS decoding into
a two-step process. First, we build up a list of each segment returned
by the server, then we walk the list in reverse and move each segment
directly to their target offset. This cuts out all the extra copying,
and means we won't lose any data off of the end of the reply.

Changes in V3:
  - Move the "Introduce xdr_stream_move_subsegment()" patch into this
    series so it can be applied now while work on the server side
    continues.
  - Drop the patch removing the Kconfig option at Trond's suggestion.

Thoughts?
Anna


Anna Schumaker (5):
  SUNRPC: Introduce xdr_stream_move_subsegment()
  SUNRPC: Add a function for directly setting the xdr page len
  SUNRPC: Add a function for zeroing out a portion of an xdr_stream
  NFS: Replace the READ_PLUS decoding code
  SUNRPC: Remove xdr_align_data() and xdr_expand_hole()

 fs/nfs/nfs42xdr.c          | 168 ++++++++++++++++++------------------
 include/linux/sunrpc/xdr.h |   7 +-
 net/sunrpc/xdr.c           | 170 +++++++++++++++++++++++--------------
 3 files changed, 200 insertions(+), 145 deletions(-)

-- 
2.37.1


             reply	other threads:[~2022-07-21 18:21 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-21 18:21 Anna Schumaker [this message]
2022-07-21 18:21 ` [PATCH v3 1/5] SUNRPC: Introduce xdr_stream_move_subsegment() Anna Schumaker
2022-07-21 18:21 ` [PATCH v3 2/5] SUNRPC: Add a function for directly setting the xdr page len Anna Schumaker
2022-07-21 18:21 ` [PATCH v3 3/5] SUNRPC: Add a function for zeroing out a portion of an xdr_stream Anna Schumaker
2022-07-21 18:21 ` [PATCH v3 4/5] NFS: Replace the READ_PLUS decoding code Anna Schumaker
2022-07-21 18:21 ` [PATCH v3 5/5] SUNRPC: Remove xdr_align_data() and xdr_expand_hole() 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=20220721182135.1885071-1-anna@kernel.org \
    --to=anna@kernel.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=trond.myklebust@hammerspace.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