public inbox for linux-nfs@vger.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH 0/2] Add a "file_sync" export option
@ 2024-11-06 16:57 cel
  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
  0 siblings, 2 replies; 3+ messages in thread
From: cel @ 2024-11-06 16:57 UTC (permalink / raw)
  To: Neil Brown, Jeff Layton, Olga Kornievskaia, Dai Ngo, Tom Talpey
  Cc: linux-nfs, Chuck Lever

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-11-06 16:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-06 16:57 [RFC PATCH 0/2] Add a "file_sync" export option cel
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox