Re: [PATCH v2] vfs: Pre-allocate superblock in sget_fc() if !test

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.



[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux