Re: [PATCH] blk-mq: move srcu from blk_mq_hw_ctx to request_queue

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

 



On 11/3/21 10:00 AM, Ming Lei wrote:
> In case of BLK_MQ_F_BLOCKING, per-hctx srcu is used to protect dispatch
> critical area. However, this srcu instance stays at the end of hctx, and
> it often takes standalone cacheline, often cold.
> 
> Inside srcu_read_lock() and srcu_read_unlock(), WRITE is always done on
> the indirect percpu variable which is allocated from heap instead of
> being embedded, srcu->srcu_idx of is read only in srcu_read_lock(). It
> doesn't matter if srcu structure stays in hctx or request queue.
> 
> So switch to per-request-queue srcu for protecting dispatch, and this
> way simplifies quiesce a lot, not mention quiesce is always done on the
> request queue wide.
> 
> t/io_uring randread IO test shows that IOPS is basically not affected by this
> change on null_blk(g_blocking, MQ).

Looks good to me.

-- 
Jens Axboe




[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