From: Jan Kara <jack@suse.cz>
To: Jeff Layton <jlayton@kernel.org>
Cc: Christian Brauner <brauner@kernel.org>,
Alexander Viro <viro@zeniv.linux.org.uk>,
"Darrick J. Wong" <djwong@kernel.org>,
Hugh Dickins <hughd@google.com>,
Andrew Morton <akpm@linux-foundation.org>,
Dave Chinner <david@fromorbit.com>,
Chuck Lever <chuck.lever@oracle.com>,
linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-xfs@vger.kernel.org, linux-mm@kvack.org,
linux-nfs@vger.kernel.org
Subject: Re: [RFC PATCH 1/3][RESEND] fs: add infrastructure for opportunistic high-res ctime/mtime updates
Date: Fri, 21 Apr 2023 12:23:53 +0200 [thread overview]
Message-ID: <20230421102353.blzqjrglgyiupf3g@quack3> (raw)
In-Reply-To: <c63c4c811cfa6c6396674e497920ec984cb476d1.camel@kernel.org>
On Tue 11-04-23 12:04:36, Jeff Layton wrote:
> On Tue, 2023-04-11 at 17:07 +0200, Christian Brauner wrote:
> > On Tue, Apr 11, 2023 at 10:37:00AM -0400, Jeff Layton wrote:
> > There's some performance concerns here. Calling
> > stat() is super common and it would potentially make the next iop more
> > expensive. Recursively changing ownership in the container use-case come
> > to mind which are already expensive.
>
> stat() is common, but not generally as common as write calls are. I
> expect that we'll get somewhat similar results tochanged i_version over
> to use a similar QUERIED flag.
>
> The i_version field was originally very expensive and required metadata
> updates on every write. After making that change, we got the same
> performance back in most tests that we got without the i_version field
> being enabled at all. Basically, this just means we'll end up logging an
> extra journal transaction on some writes that follow a stat() call,
> which turns out to be line noise for most workloads.
>
> I do agree that performance is a concern here though. We'll need to
> benchmark this somehow.
So for stat-intensive read-only workloads the additional inode_lock locking
during stat may be noticeable. I suppose a stress test stating the same
file in a loop from all CPUs the machine has will certainly notice :) But
that's just an unrealistic worst case.
We could check whether the QUERIED flag is already set and if yes, skip the
locking. That should fix the read-only workload case. We just have to think
whether there would not be some unpleasant races created.
Honza
--
Jan Kara <jack@suse.com>
SUSE Labs, CR
next prev parent reply other threads:[~2023-04-21 10:23 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-11 14:36 [RFC PATCH 0/3][RESEND] fs: opportunistic high-res file timestamps Jeff Layton
2023-04-11 14:37 ` [RFC PATCH 1/3][RESEND] fs: add infrastructure for opportunistic high-res ctime/mtime updates Jeff Layton
2023-04-11 14:42 ` Darrick J. Wong
2023-04-11 14:54 ` Jeff Layton
2023-04-11 15:07 ` Christian Brauner
2023-04-11 16:04 ` Jeff Layton
2023-04-21 10:23 ` Jan Kara [this message]
2023-04-11 14:37 ` [RFC PATCH 2/3][RESEND] shmem: mark for high-res timestamps on next update after getattr Jeff Layton
2023-04-24 7:20 ` kernel test robot
2023-04-11 14:37 ` [RFC PATCH 3/3][RESEND] xfs: mark the inode for high-res timestamp update in getattr Jeff Layton
2023-04-11 14:54 ` Darrick J. Wong
2023-04-11 15:15 ` Christian Brauner
2023-04-11 16:05 ` Jeff Layton
2023-04-11 15:58 ` Jeff Layton
2023-04-21 2:04 ` kernel test robot
2023-04-11 23:13 ` [RFC PATCH 0/3][RESEND] fs: opportunistic high-res file timestamps Dave Chinner
2023-04-15 11:35 ` Amir Goldstein
2023-04-15 12:13 ` Jeff Layton
2023-04-15 16:19 ` [RFC PATCH 0/3][RESEND] " Chuck Lever III
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=20230421102353.blzqjrglgyiupf3g@quack3 \
--to=jack@suse.cz \
--cc=akpm@linux-foundation.org \
--cc=brauner@kernel.org \
--cc=chuck.lever@oracle.com \
--cc=david@fromorbit.com \
--cc=djwong@kernel.org \
--cc=hughd@google.com \
--cc=jlayton@kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux-nfs@vger.kernel.org \
--cc=linux-xfs@vger.kernel.org \
--cc=viro@zeniv.linux.org.uk \
/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