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