Re: [PATCH] btrfs: Remove BTRFS_INODE_IN_DELALLOC_LIST flag

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

 



On Wed, May 27, 2020 at 08:48:31PM +0100, Filipe Manana wrote:
> On Wed, May 27, 2020 at 12:42 PM Nikolay Borisov <nborisov@xxxxxxxx> wrote:
> >
> > The flag simply replicates whether btrfs_inode::delallocs_inodes list
> > is empty or not. Just defer this check to the list management functions
> > (btrfs_add_delalloc_inodes/__btrfs_del_delalloc_inode) which are
> > always called under btrfs_root::delalloc_lock.
> 
> The flag is there to avoid taking the root's delalloc_lock spinlock
> everytime a range is marked for delalloc for any inode of the
> subvolume.

I overlooked that not all uses of the bit are under delalloc_lock, which
would make it redundant, but both test_bit are inside inode lock, not
the delalloc lock.

> Have you measured performance with very high concurrency of buffered
> writes against files in the same subvolume?

I'll remove the patch for now unless the performance is verified to be
ok.



[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux