From: Sagi Grimberg <sagi@grimberg.me>
To: Chuck Lever <chuck.lever@oracle.com>, linux-nfs@vger.kernel.org
Cc: Trond Myklebust <trondmy@kernel.org>,
Jeff Layton <jlayton@kernel.org>,
Anna Schumaker <Anna.Schumaker@netapp.com>
Subject: Re: [PATCH] NFSv4.2: fix setattr caching of TIME_[MODIFY|ACCESS]_SET when timestamps are delegated
Date: Tue, 6 May 2025 16:45:28 +0300 [thread overview]
Message-ID: <b4e7bbbb-0ea2-4fda-890a-e0ba0ec48d2d@grimberg.me> (raw)
In-Reply-To: <9489779a-e094-48fe-860f-7181f5d41223@oracle.com>
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@grimberg.me>
>> ---
>> 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.
next prev parent reply other threads:[~2025-05-06 13:45 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-25 12:49 [PATCH] NFSv4.2: fix setattr caching of TIME_[MODIFY|ACCESS]_SET when timestamps are delegated Sagi Grimberg
2025-05-04 6:45 ` Sagi Grimberg
2025-05-05 13:23 ` Jeff Layton
2025-05-06 13:43 ` Sagi Grimberg
2025-05-06 13:52 ` Jeff Layton
2025-05-06 14:25 ` Sagi Grimberg
2025-05-06 14:29 ` Jeff Layton
2025-05-05 13:25 ` Chuck Lever
2025-05-06 13:45 ` Sagi Grimberg [this message]
2025-05-06 15:58 ` Trond Myklebust
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=b4e7bbbb-0ea2-4fda-890a-e0ba0ec48d2d@grimberg.me \
--to=sagi@grimberg.me \
--cc=Anna.Schumaker@netapp.com \
--cc=chuck.lever@oracle.com \
--cc=jlayton@kernel.org \
--cc=linux-nfs@vger.kernel.org \
--cc=trondmy@kernel.org \
/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