public inbox for linux-nfs@vger.kernel.org
 help / color / mirror / Atom feed
From: cel@kernel.org
To: Neil Brown <neilb@suse.de>, Jeff Layton <jlayton@kernel.org>,
	Olga Kornievskaia <okorniev@redhat.com>,
	Dai Ngo <dai.ngo@oracle.com>, Tom Talpey <tom@talpey.com>
Cc: <linux-nfs@vger.kernel.org>, Chuck Lever <chuck.lever@oracle.com>
Subject: [RFC PATCH 0/2] Add a "file_sync" export option
Date: Wed,  6 Nov 2024 11:57:14 -0500	[thread overview]
Message-ID: <20241106165716.109681-1-cel@kernel.org> (raw)

From: Chuck Lever <chuck.lever@oracle.com>

This is a quick-and-dirty prototype of an idea we discussed briefly
during the recent NFS bake-a-thon.

tmpfs exports don't need clients to send a COMMIT because they are
not backed by persistent storage. NFSD can change all NFS WRITE
operations to FILE_SYNC to signal to clients that COMMIT is not
necessary.

The theory behind this is that waiting for the COMMIT adds latency.
Without the COMMIT, applications should observe lower latency on
write(2) and close(2).

We could make this an internal export flag that tmpfs sets, but
there are other cases where a separate COMMIT might not be a benefit
because the underlying storage device is faster than the network.

This patch aims to give administrators the ability to make that call
for a whole export -- tmpfs, RAM disk-backed file systems, and file
systems backed by NVMe might all benefit.

I've tested this patch (with a sibling patch to nfs-utils) and found
that it doesn't make any difference on fast networks. Someone else
might find it helps them, so I'm posting it here for others to try.

Chuck Lever (2):
  NFSD: Return the actual stable_how value to clients
  NFSD: Add a "file_sync" export option

 fs/nfsd/export.c                 |  1 +
 fs/nfsd/nfs3proc.c               |  2 +-
 fs/nfsd/nfs4proc.c               |  3 +-
 fs/nfsd/nfsproc.c                |  3 +-
 fs/nfsd/vfs.c                    | 54 ++++++++++++++++++++++++--------
 fs/nfsd/vfs.h                    |  8 ++---
 fs/nfsd/xdr3.h                   |  2 +-
 include/uapi/linux/nfsd/export.h |  3 +-
 8 files changed, 54 insertions(+), 22 deletions(-)

-- 
2.47.0


             reply	other threads:[~2024-11-06 16:57 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-06 16:57 cel [this message]
2024-11-06 16:57 ` [RFC PATCH 1/2] NFSD: Return the actual stable_how value to clients cel
2024-11-06 16:57 ` [RFC PATCH 2/2] NFSD: Add a "file_sync" export option cel

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=20241106165716.109681-1-cel@kernel.org \
    --to=cel@kernel.org \
    --cc=chuck.lever@oracle.com \
    --cc=dai.ngo@oracle.com \
    --cc=jlayton@kernel.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=neilb@suse.de \
    --cc=okorniev@redhat.com \
    --cc=tom@talpey.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