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]
Date:   Mon, 31 Jan 2022 03:11:59 +0000
From:   Al Viro <viro@...iv.linux.org.uk>
To:     Waiman Long <longman@...hat.com>
Cc:     linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org,
        Christian Brauner <brauner@...nel.org>
Subject: Re: [PATCH v2] vfs: Pre-allocate superblock in sget_fc() if !test

On Mon, Jan 24, 2022 at 11:10:06AM -0500, Waiman Long wrote:
> When the test function is not defined in sget_fc(), we always need
> to allocate a new superblock. So there is no point in acquiring the
> sb_lock twice in this case. Optimize the !test case by pre-allocating
> the superblock first before acquring the lock.

Umm...  Do you really see the contention on that sucker?  Because if you
do, I'd expect sget_fc() to be the least of your problems.

TBH, I'd be very surprised if that had caused measurable improvement in
any setup.  Seriously, take a look at alloc_super().  If spin_lock() +
spin_unlock() + branch is noticable among all that...  And it's not
as if you were not going to dirty that cacheline shortly afterwards
anyway, so cacheline pingpong is not an issue either...

I'm not saying that the patch is broken, I'm just wondering if it's worth
bothering with.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ