lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5663E686-5158-425F-9149-9C7071423048@oracle.com>
Date:   Sat, 15 Apr 2023 16:19:22 +0000
From:   Chuck Lever III <chuck.lever@...cle.com>
To:     Amir Goldstein <amir73il@...il.com>
CC:     Jeff Layton <jlayton@...nel.org>,
        Dave Chinner <david@...morbit.com>,
        Al Viro <viro@...iv.linux.org.uk>,
        Christian Brauner <brauner@...nel.org>,
        "Darrick J. Wong" <djwong@...nel.org>,
        Hugh Dickins <hughd@...gle.com>,
        Andrew Morton <akpm@...ux-foundation.org>,
        "linux-fsdevel@...r.kernel.org" <linux-fsdevel@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "linux-xfs@...r.kernel.org" <linux-xfs@...r.kernel.org>,
        "linux-mm@...ck.org" <linux-mm@...ck.org>,
        Linux NFS Mailing List <linux-nfs@...r.kernel.org>,
        Josef Bacik <josef@...icpanda.com>
Subject: Re: [RFC PATCH 0/3][RESEND] opportunistic high-res file timestamps



> On Apr 15, 2023, at 7:35 AM, Amir Goldstein <amir73il@...il.com> wrote:
> 
> On Tue, Apr 11, 2023 at 5:38 PM Jeff Layton <jlayton@...nel.org> wrote:
>> 
>> (Apologies for the resend, but I didn't send this with a wide enough
>> distribution list originally).
>> 
>> A few weeks ago, during one of the discussions around i_version, Dave
>> Chinner wrote this:
>> 
>> "You've missed the part where I suggested lifting the "nfsd sampled
>> i_version" state into an inode state flag rather than hiding it in
>> the i_version field. At that point, we could optimise away the
>> secondary ctime updates just like you are proposing we do with the
>> i_version updates.  Further, we could also use that state it to
>> decide whether we need to use high resolution timestamps when
>> recording ctime updates - if the nfsd has not sampled the
>> ctime/i_version, we don't need high res timestamps to be recorded
>> for ctime...."
>> 
>> While I don't think we can practically optimize away ctime updates
>> like we do with i_version, I do like the idea of using this scheme to
>> indicate when we need to use a high-res timestamp.
>> 
>> This patchset is a first stab at a scheme to do this. It declares a new
>> i_state flag for this purpose and adds two new vfs-layer functions to
>> implement conditional high-res timestamp fetching. It then converts both
>> tmpfs and xfs to use it.
>> 
>> This seems to behave fine under xfstests, but I haven't yet done
>> any performance testing with it. I wouldn't expect it to create huge
>> regressions though since we're only grabbing high res timestamps after
>> each query.
>> 
>> I like this scheme because we can potentially convert any filesystem to
>> use it. No special storage requirements like with i_version field.  I
>> think it'd potentially improve NFS cache coherency with a whole swath of
>> exportable filesystems, and helps out NFSv3 too.
>> 
>> This is really just a proof-of-concept. There are a number of things we
>> could change:
>> 
>> 1/ We could use the top bit in the tv_sec field as the flag. That'd give
>>   us different flags for ctime and mtime. We also wouldn't need to use
>>   a spinlock.
>> 
>> 2/ We could probably optimize away the high-res timestamp fetch in more
>>   cases. Basically, always do a coarse-grained ts fetch and only fetch
>>   the high-res ts when the QUERIED flag is set and the existing time
>>   hasn't changed.
>> 
>> If this approach looks reasonable, I'll plan to start working on
>> converting more filesystems.
>> 
>> One thing I'm not clear on is how widely available high res timestamps
>> are. Is this something we need to gate on particular CONFIG_* options?
>> 
>> Thoughts?
> 
> Jeff,
> 
> Considering that this proposal is pretty uncontroversial,
> do you still want to discuss/lead a session on i_version changes in LSF/MM?
> 
> I noticed that Chuck listed "timespamt resolution and i_version" as part
> of his NFSD BoF topic proposal [1], but I do not think all of these topics
> can fit in one 30 minute session.

That's fair.

If lumping these topics together doesn't seem sensible,
I'm happy to consider splitting off the major topics,
and then including the remaining in a generic network
filesystem session or relegating them to the hallway
track.

I can suggest something more specific in the LSF TOPIC
thread.


--
Chuck Lever


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ