Re: disk removal slowdown due to rcu_barrier

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

 



On 6/6/24 21:49, Mikulas Patocka wrote:
> Hi
> 
> The patch dd291d77cc90eb6a86e9860ba8e6e38eebd57d12 (block: Introduce zone 
> write plugging) causes a performance regression when removing block 
> devices.
> 
> The kernel 6.9 removes a DM block device in 73ms. The kernel 6.10-rc in 
> 103ms.
> 
> That patch adds a rcu_barrier() call to the disk-removal code path and it 
> causes the slowdown. We get this stacktrace when we attempt to remove 
> large amount of DM devices. Note that the removed devices aren't zoned at 
> all.

OK. Let me send a fix patch to avoid the barrier for non-zoned devices. For
zoned devices, it can only be avoided if the device does not need zone write
plugging, which is the case for most zoned DM setup.

> 
> [<0>] rcu_barrier+0x208/0x320
> [<0>] disk_free_zone_resources+0x102/0x160
> [<0>] disk_release+0x72/0xe0
> [<0>] device_release+0x34/0x90
> [<0>] kobject_put+0x8b/0x1d0
> [<0>] cleanup_mapped_device+0xd8/0x160
> [<0>] __dm_destroy+0x12a/0x1d0
> [<0>] dm_hash_remove_all+0x77/0x1a0
> [<0>] remove_all+0x23/0x40
> [<0>] ctl_ioctl+0x1dc/0x530
> [<0>] dm_ctl_ioctl+0xe/0x20
> [<0>] __x64_sys_ioctl+0x94/0xd0
> [<0>] do_syscall_64+0x82/0x160
> [<0>] entry_SYSCALL_64_after_hwframe+0x76/0x7e
> 
> Mikulas
> 

-- 
Damien Le Moal
Western Digital Research





[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux