Re: [PATCH] md/raid5: reduce lock contention in read_one_chunk()

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

 



On Fri, 04 Jun 2021 09:31:04 +1000
"NeilBrown" <neilb@xxxxxxx> wrote:
Hey Neil,
thank you for your feedback !

> This surprises me.  I only expect rwlocks to be a benefit when the
> readlock is held for significantly longer than the time it takes to get
> an uncontended lock, and I don't think that is happening here.
> However, you have done the measurements (thanks for that!) and I cannot
> argue with numbers.
To be honest, I expected spinlock to perform as well as rwlock in this case too,
but experiment proves otherwise (lock contention and iops are almost identical to before the patch).
Maybe it's because wait_event_lock_irq() is in the critical section ?

> Could you try that and report results?  Thanks.
I patched the code as per your suggestion and it performs even better:
up to 4.2M iops with zero contention on that lock (~55GB throughput).
Since it only impacts quiesce now, I thought it'd be better to use spinlock afterall.
Please let me know if you think otherwise.

I'll run all tests again, rephrase where needed and resubmit.

Thanks,
Gal



[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux