Re: [PATCH V2 07/20] block: prevent adding/deleting disk during updating nr_hw_queues

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

 



On Mon, Apr 21, 2025 at 10:39:24AM +0800, Ming Lei wrote:
> > In my view, RCU is optimized for read-heavy workloads with:
> > - Non-blocking readers
> 
> srcu allows blocking reader

It does.  But it's certainly not optimized for long blocking readers.

> Basically I agree with you that rwsem(instead of rwlock) should match with
> this case in theory, but I feel that rwsem is stronger than srcu from lock
> viewpoint, and we will add new dependency if rwsem is held inside
> ->store(), such as the following splat.

How does manually implementing a reader/write lock using SRCU avoid
that dependency vs just hiding it?

I'd rather sort this out as a rwsem is very natural her as Nilay pointed
out, and also avoids the whole giv up and retry pattern.




[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