From: Mateusz Guzik <mjguzik@gmail.com>
To: Christian Brauner <brauner@kernel.org>
Cc: viro@zeniv.linux.org.uk, jack@suse.cz,
linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org,
hughd@google.com, linux-ext4@vger.kernel.org, tytso@mit.edu,
linux-mm@kvack.org
Subject: Re: [PATCH v2 0/3] symlink length caching
Date: Wed, 20 Nov 2024 20:47:50 +0100 [thread overview]
Message-ID: <CAGudoHH-asEyPj7CUNF+ApVhRoG1C4tmQYuko1SLNQ0o-LXaaw@mail.gmail.com> (raw)
In-Reply-To: <20241120-eisbahn-frost-824303fa16d9@brauner>
On Wed, Nov 20, 2024 at 12:13 PM Christian Brauner <brauner@kernel.org> wrote:
>
> On Wed, Nov 20, 2024 at 11:42:33AM +0100, Mateusz Guzik wrote:
> > Interestingly even __read_seqcount_begin (used *twice* in path_init())
> > is missing one. I sent a patch to fix it long time ago but the
> > recipient did not respond
>
> I snatched it.
Thanks.
But I have to say having *two* counters to check for each lookup is
bothering me and making me wonder if they could be unified (or another
counter added to cover for either of those?)? No clue about
feasibility, is there a known showstopper?
Both are defined like so:
__cacheline_aligned_in_smp DEFINE_SEQLOCK(mount_lock);
__cacheline_aligned_in_smp DEFINE_SEQLOCK(rename_lock);
Suppose nothing can be done to only look at one counter on lookup.
In that case how about combining the suckers into one cacheline at
least? Sure, this will result in new bounces for threads modifying
these, but this is relatively infrequent compared to how often lookups
performed and with these slapped together there will be only one line
spent on it, instead of two.
Just RFC'ing it here.
--
Mateusz Guzik <mjguzik gmail.com>
prev parent reply other threads:[~2024-11-20 19:48 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-19 9:45 Mateusz Guzik
2024-11-19 9:45 ` [PATCH v2 1/3] vfs: support caching symlink lengths in inodes Mateusz Guzik
2024-11-20 4:15 ` wangjianjian (C)
2024-11-20 5:01 ` Matthew Wilcox
2024-11-20 5:10 ` wangjianjian (C)
2024-11-19 9:45 ` [PATCH v2 2/3] ext4: use inode_set_cached_link() Mateusz Guzik
2024-11-19 9:45 ` [PATCH v2 3/3] tmpfs: " Mateusz Guzik
2024-11-19 17:53 ` [PATCH v2 0/3] symlink length caching Theodore Ts'o
2024-11-19 18:07 ` Mateusz Guzik
2024-11-20 10:33 ` Christian Brauner
2024-11-20 10:42 ` Mateusz Guzik
2024-11-20 11:12 ` Christian Brauner
2024-11-20 19:47 ` Mateusz Guzik [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=CAGudoHH-asEyPj7CUNF+ApVhRoG1C4tmQYuko1SLNQ0o-LXaaw@mail.gmail.com \
--to=mjguzik@gmail.com \
--cc=brauner@kernel.org \
--cc=hughd@google.com \
--cc=jack@suse.cz \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=tytso@mit.edu \
--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