On 05/05/2025 16:25, Chuck Lever wrote:
On 4/25/25 8:49 AM, Sagi Grimberg wrote:
nfs_setattr will flush all pending writes before updating a file time
attributes. However when the client holds delegated timestamps, it can
update its timestamps locally as it is the authority for the file
times attributes. The client will later set the file attributes by
adding a setattr to the delegreturn compound updating the server time
attributes.
Fix nfs_setattr to avoid flushing pending writes when the file time
attributes are delegated and the mtime/atime are set to a fixed
timestamp (ATTR_[MODIFY|ACCESS]_SET. Also, when sending the setattr
procedure over the wire, we need to clear the correct attribute bits
from the bitmask.
I was able to measure a noticable speedup when measuring untar performance.
Test: $ time tar xzf ~/dir.tgz
Baseline: 1m13.072s
Patched: 0m49.038s
Which is more than 30% latency improvement.
That's significant. Next step is to ensure this doesn't cause any
functional regressions. Have you run fstests ?
I have not. But I will. Please note the comment under the '---' separator.
This only make a difference if nfsd grants the client a space_limit with
the write deleg. Without it, untar is still very much synchronous.
Signed-off-by: Sagi Grimberg <sagi@xxxxxxxxxxx>
---
Tested this on a vm in my laptop against chuck nfsd-testing which
grants write delegs for write-only opens, plus another small modparam
that also adds a space_limit to the delegation.