All of lore.kernel.org
 help / color / mirror / Atom feed
From: Anna.Schumaker@Netapp.com
To: steved@redhat.com, linux-nfs@vger.kernel.org
Cc: Anna.Schumaker@Netapp.com
Subject: [PATCH v1 0/6] NFSD: Improvements for the NFSv4.2 READ_PLUS operation
Date: Mon, 16 May 2022 16:35:43 -0400	[thread overview]
Message-ID: <20220516203549.2605575-1-Anna.Schumaker@Netapp.com> (raw)

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

The main motivation for this patchset is fixing generic/091 and
generic/263 with READ_PLUS. These tests appear to be failing due to
files getting modified in the middle of reply encoding. Attempts to lock
the file for the entire encode result in a deadlock, since llseek() and
read() both need the file lock.

The solution is to read everything from disk at once, and then check if
each buffer page is all zeroes or not. As a bonus, this lets us support
READ_PLUS hole segments on filesystems that don't track sparse files.
Additionally, this also solves the performance issues I hit when testing
using btrfs on a virtual machine.

I created a wiki page with the results of my performance testing here:
    https://wiki.linux-nfs.org/wiki/index.php/Read_Plus_May_2022

These should probably have some soak time in linux-next, so let's target
them for the Linux 5.20 (6.0?) merge window rather than rushing to get
them into 5.19. As far as ordering goes, these patches should probably
go in before the related client changes as the client will also be
changed to make use of the xdr_stream_move_segment() function.

Thoughts?
Anna


Anna Schumaker (6):
  SUNRPC: Introduce xdr_stream_move_segment()
  SUNRPC: Introduce xdr_encode_double()
  SUNRPC: Introduce xdr_buf_trim_head()
  SUNRPC: Introduce xdr_buf_nth_page_address()
  SUNRPC: Export xdr_buf_pagecount()
  NFSD: Repeal and replace the READ_PLUS implementation

 fs/nfsd/nfs4xdr.c          | 202 +++++++++++++++++++------------------
 include/linux/sunrpc/xdr.h |   6 ++
 net/sunrpc/xdr.c           | 102 +++++++++++++++++++
 3 files changed, 210 insertions(+), 100 deletions(-)

-- 
2.36.1


             reply	other threads:[~2022-05-16 21:02 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-16 20:35 Anna.Schumaker [this message]
2022-05-16 20:35 ` [PATCH v1 1/6] SUNRPC: Introduce xdr_stream_move_segment() Anna.Schumaker
2022-05-16 20:35 ` [PATCH v1 2/6] SUNRPC: Introduce xdr_encode_double() Anna.Schumaker
2022-05-16 20:35 ` [PATCH v1 3/6] SUNRPC: Introduce xdr_buf_trim_head() Anna.Schumaker
2022-05-16 20:35 ` [PATCH v1 4/6] SUNRPC: Introduce xdr_buf_nth_page_address() Anna.Schumaker
2022-05-16 20:35 ` [PATCH v1 5/6] SUNRPC: Export xdr_buf_pagecount() Anna.Schumaker
2022-05-16 20:35 ` [PATCH v1 6/6] NFSD: Repeal and replace the READ_PLUS implementation Anna.Schumaker
2022-05-16 21:37   ` Chuck Lever III
2022-05-17 13:39     ` Anna Schumaker
2022-05-17 13:53       ` Chuck Lever III
2022-05-17 14:55         ` 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=20220516203549.2605575-1-Anna.Schumaker@Netapp.com \
    --to=anna.schumaker@netapp.com \
    --cc=linux-nfs@vger.kernel.org \
    --cc=steved@redhat.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 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.