lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <sqtku5kwqvwxngv42zecgsz2a4baxwga2qciwczcmmwjx52x6c@a7uuyhks3ipt>
Date: Wed, 19 Mar 2025 17:36:41 +0100
From: Jan Kara <jack@...e.cz>
To: Mateusz Guzik <mjguzik@...il.com>
Cc: Jan Kara <jack@...e.cz>, brauner@...nel.org, viro@...iv.linux.org.uk, 
	linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org
Subject: Re: [PATCH] fs: load the ->i_sb pointer once in
 inode_sb_list_{add,del}

On Wed 19-03-25 17:16:06, Mateusz Guzik wrote:
> On Wed, Mar 19, 2025 at 5:11 PM Jan Kara <jack@...e.cz> 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@...il.com>
> >
> > I'm surprised it matters for the compiler but as Christian wrote, why not.
> > Feel free to add:
> >
> 
> In stock code the fence in spin_lock forces the compiler to load
> ->i_sb again -- as far as it knows it could have changed.
> 
> On the other this patch forces the compiler to remember the value for
> the same reason, which turns out to produce less code.

I see. Thanks for explanation!

								Honza
-- 
Jan Kara <jack@...e.com>
SUSE Labs, CR

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ