From: Christoph Hellwig <hch@infradead.org>
To: Mateusz Guzik <mjguzik@gmail.com>
Cc: Christoph Hellwig <hch@infradead.org>,
brauner@kernel.org, viro@zeniv.linux.org.uk, jack@suse.cz,
linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH v2] fs: make generic_fillattr() tail-callable and utilize it in ext2/ext4
Date: Mon, 7 Apr 2025 01:54:29 -0700 [thread overview]
Message-ID: <Z_OSxRO4b7OduCTx@infradead.org> (raw)
In-Reply-To: <CAGudoHFcUBdZUBDFqWs4aLQfXyN4781-g-8x0mfBWwEMrTFQUg@mail.gmail.com>
On Fri, Apr 04, 2025 at 10:14:32PM +0200, Mateusz Guzik wrote:
> Callers don't need to check it because it is guaranteed to be 0. Also
> returning 0 vs returning nothing makes virtually no difference to
> anyone.
Nom the return value very clearly states it can return something else
with your patch, and people will sooner or later do that.
Let's stop these silly things that just create nasty landmines for no
reason at all.
> As for general context, there are several small slowdowns when issuing
> fstat() and I'm tackling them bit by bit (and yes, tail calling vs
> returning to the caller and that caller exiting is a small
> optimization).
Please prove that it makes a difference. And if it does do the
changes in a sane way by keeping the helper as is except for marking
it as inline candidate and a special _tail helper below that inlines
it.
But the bar for such micro-optimizations should be high, and so far you
have no managed to provide any rationale for it.
prev parent reply other threads:[~2025-04-07 8:54 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-01 16:52 [PATCH v2] fs: make generic_fillattr() tail-callable and utilize it in ext2/ext4 Mateusz Guzik
2025-04-03 8:43 ` Christian Brauner
2025-04-04 8:33 ` Christoph Hellwig
2025-04-04 20:14 ` Mateusz Guzik
2025-04-07 8:54 ` Christoph Hellwig [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=Z_OSxRO4b7OduCTx@infradead.org \
--to=hch@infradead.org \
--cc=brauner@kernel.org \
--cc=jack@suse.cz \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mjguzik@gmail.com \
--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