[RFC PATCH 0/2] Add a "file_sync" export option

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Chuck Lever <chuck.lever@xxxxxxxxxx>

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





[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux