Linux filesystem development
 help / color / mirror / Atom feed
From: Matthew Wilcox <willy@infradead.org>
To: Jan Kara <jack@suse.cz>
Cc: Mateusz Guzik <mjguzik@gmail.com>,
	brauner@kernel.org, viro@zeniv.linux.org.uk,
	linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH] fs: load the ->i_sb pointer once in inode_sb_list_{add,del}
Date: Wed, 19 Mar 2025 16:14:22 +0000	[thread overview]
Message-ID: <Z9rtXtqFAg7S5A1k@casper.infradead.org> (raw)
In-Reply-To: <nb5g34ehva6wmjusa3tin3wbsr26gm6shvuxfspzkwpor6edxk@ncx2um24ipwq>

On Wed, Mar 19, 2025 at 05:11:25PM +0100, Jan Kara wrote:
> On Wed 19-03-25 01:46:35, Mateusz Guzik wrote:
> > While this may sound like a pedantic clean up, it does in fact impact
> > code generation -- the patched add routine is slightly smaller.
> > 
> > Signed-off-by: Mateusz Guzik <mjguzik@gmail.com>
> 
> I'm surprised it matters for the compiler but as Christian wrote, why not.
> Feel free to add:

I suspect it's because there's a spin_lock() involved.  The barriers
we have probably mean we've told the compiler that it can't cache the
value loaded before the spin_lock().

  reply	other threads:[~2025-03-19 16:14 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-19  0:46 [PATCH] fs: load the ->i_sb pointer once in inode_sb_list_{add,del} Mateusz Guzik
2025-03-19  8:28 ` Christian Brauner
2025-03-19  8:28 ` Christian Brauner
2025-03-19 16:11 ` Jan Kara
2025-03-19 16:14   ` Matthew Wilcox [this message]
2025-03-19 16:16   ` Mateusz Guzik
2025-03-19 16:36     ` Jan Kara

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=Z9rtXtqFAg7S5A1k@casper.infradead.org \
    --to=willy@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