linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff Layton <jlayton@kernel.org>
To: Dave Chinner <david@fromorbit.com>
Cc: tytso@mit.edu, adilger.kernel@dilger.ca,
	linux-ext4@vger.kernel.org,
	linux-fsdevel <linux-fsdevel@vger.kernel.org>,
	lczerner@redhat.com, Benjamin Coddington <bcodding@redhat.com>
Subject: Re: should we make "-o iversion" the default on ext4 ?
Date: Mon, 25 Jul 2022 12:22:21 -0400	[thread overview]
Message-ID: <7ae8a678f59a49ffeaaa39265d5108135911eeb3.camel@kernel.org> (raw)
In-Reply-To: <20220721223244.GP3600936@dread.disaster.area>

On Fri, 2022-07-22 at 08:32 +1000, Dave Chinner wrote:
> On Tue, Jul 19, 2022 at 09:51:33AM -0400, Jeff Layton wrote:
> > Back in 2018, I did a patchset [1] to rework the inode->i_version
> > counter handling to be much less expensive, particularly when no-one is
> > querying for it.
> 
> Yup, there's zero additional overhead for maintaining i_version in
> XFS when nothing is monitoring it. Updating it comes for free in any
> transaction that modifies the inode, so when writes
> occur i_version gets bumped if timestamps change or allocation is
> required.
> 
> And when something is monitoring it, the overhead is effectively a
> single "timestamp" update for each peek at i_version the monitoring
> agent makes. This is also largely noise....
> 
> > Testing at the time showed that the cost of enabling i_version on ext4
> > was close to 0 when nothing is querying it, but I stopped short of
> > trying to make it the default at the time (mostly out of an abundance of
> > caution). Since then, we still see a steady stream of cache-coherency
> > problems with NFSv4 on ext4 when this option is disabled (e.g. [2]).
> > 
> > Is it time to go ahead and make this option the default on ext4? I don't
> > see a real downside to doing so, though I'm unclear on how we should
> > approach this. Currently the option is twiddled using MS_I_VERSION flag,
> > and it's unclear to me how we can reverse the sense of such a flag.
> 
> XFS only enables SB_I_VERSION based on an on disk format flag - you
> can't turn it on or off by mount options, so it completely ignores
> MS_I_VERSION.
> 
> > Thoughts?
> 
> My 2c is to behave like XFS: ignore the mount option and always turn
> it on.

I'd be fine with that, personally.

They could also couple that with a tune2fs flag or something, so you
could still disable it if it were a problem for some reason.

It's unlikely that anyone will really notice however, so turning it on
unconditionally may be the best place to start.
-- 
Jeff Layton <jlayton@kernel.org>

      reply	other threads:[~2022-07-25 16:22 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-19 13:51 should we make "-o iversion" the default on ext4 ? Jeff Layton
2022-07-20 14:15 ` Lukas Czerner
2022-07-20 14:38   ` Jeff Layton
2022-07-20 15:22     ` Lukas Czerner
2022-07-20 16:42       ` Jeff Layton
2022-07-21 14:06         ` Lukas Czerner
2022-07-21 17:03           ` Jeff Layton
2022-07-20 15:56     ` Benjamin Coddington
2022-07-20 16:06       ` Christoph Hellwig
2022-07-20 16:15       ` Jeff Layton
2022-07-20 16:29         ` Benjamin Coddington
2022-07-20 16:46           ` Jeff Layton
2022-07-21 22:32 ` Dave Chinner
2022-07-25 16:22   ` Jeff Layton [this message]

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=7ae8a678f59a49ffeaaa39265d5108135911eeb3.camel@kernel.org \
    --to=jlayton@kernel.org \
    --cc=adilger.kernel@dilger.ca \
    --cc=bcodding@redhat.com \
    --cc=david@fromorbit.com \
    --cc=lczerner@redhat.com \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=tytso@mit.edu \
    /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;
as well as URLs for NNTP newsgroup(s).