From: Mateusz Guzik <mjguzik@gmail.com>
To: Al Viro <viro@zeniv.linux.org.uk>
Cc: Jan Kara <jack@suse.cz>,
brauner@kernel.org, linux-kernel@vger.kernel.org,
linux-fsdevel@vger.kernel.org
Subject: Re: [RFC PATCH] vfs: dodge strlen() in vfs_readlink() when ->i_link is populated
Date: Mon, 18 Nov 2024 21:32:33 +0100 [thread overview]
Message-ID: <CAGudoHHJwreaSZirs6qfQw5-qRnyHsFLeKp_=T2=S_J=VezKLg@mail.gmail.com> (raw)
In-Reply-To: <20241118154418.GH3387508@ZenIV>
On Mon, Nov 18, 2024 at 4:44 PM Al Viro <viro@zeniv.linux.org.uk> wrote:
>
> On Mon, Nov 18, 2024 at 03:51:34PM +0100, Mateusz Guzik wrote:
>
> > This is only 1.5% because of other weird slowdowns which don't need to
> > be there, notably putname using atomics. If the other crap was already
> > fixed it would be closer to 5%.
>
> Describe your plans re putname(), please. Because we are pretty much
> certain to step on each other's toes here in the coming cycle.
I don't have immediate plans for putname, but I posted a total hack
some time ago in relation to it:
https://lore.kernel.org/all/20240604132448.101183-1-mjguzik@gmail.com/
along with this:
> The race is only possible with io_uring which has a dedicated entry
> point, thus a getname variant which takes it into account could store
> the need to use atomics as a flag in struct filename. To that end
> getname could take a boolean indicating this, fronted with some inlines
> and the current entry point renamed to __getname_flags to hide it.
> Option B is to add a routine which "upgrades" to atomics after getname
> returns, but that's a littly fishy vs audit_reusename.
> At the end of the day all spots which modify the ref could branch on the
> atomics flag.
I ended up not getting this done because there was something real off
about name caching for audit, I don't remember the details but I was
not confident the code is correct as is.
Anyhow, someone else sorting this out is most welcome.
Apart from the few things I posted I have no immediate plans to mess
with anything vfs (I do have some plans to reduce the cost of memcg
though).
--
Mateusz Guzik <mjguzik gmail.com>
next prev parent reply other threads:[~2024-11-18 20:32 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-18 8:53 [RFC PATCH] vfs: dodge strlen() in vfs_readlink() when ->i_link is populated Mateusz Guzik
2024-11-18 11:53 ` Jan Kara
2024-11-18 12:20 ` Mateusz Guzik
2024-11-18 14:41 ` Jan Kara
2024-11-18 14:51 ` Mateusz Guzik
2024-11-18 15:44 ` Al Viro
2024-11-18 20:32 ` Mateusz Guzik [this message]
2024-11-20 8:36 ` Christian Brauner
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='CAGudoHHJwreaSZirs6qfQw5-qRnyHsFLeKp_=T2=S_J=VezKLg@mail.gmail.com' \
--to=mjguzik@gmail.com \
--cc=brauner@kernel.org \
--cc=jack@suse.cz \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@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