On Mon, Aug 10, 2020 at 10:17:04AM +0800, Chao Leng wrote: > > > On 2020/8/7 21:49, Ming Lei wrote: > > On Fri, Aug 07, 2020 at 05:05:59PM +0800, Chao Leng wrote: > > > nvme_stop_queues quiesce queues for all name spaces, now quiesce one by > > > one, if there is lots of name spaces, sync wait long time(more than 10s). > > > Multipath can not fail over to retry quickly, cause io pause long time. > > > This is not expected. > > > To reduce quiesce time, we introduce async mechanism for sync SRCUs > > > and quiesce queue. > > > > > > > Frankly speaking, I prefer to replace SRCU with percpu_refcount: > > > > - percpu_refcount has much less memory footprint than SRCU, so we can simply > > move percpu_refcount into request_queue, instead of adding more bytes > > into each hctx by this patch > > > > - percpu_ref_get()/percpu_ref_put() isn't slower than srcu_read_lock()/srcu_read_unlock(). > > > > - with percpu_refcount, we can remove 'srcu_idx' from hctx_lock/hctx_unlock() > IO pause long time if fail over, this is a serios problem. we need fix > it as soon as possible. SRCU is just used for blocking queue, The issue has been long time since SRCU is taken, not sure if it is something urgent. > non blocking queue need 0 bytes. So more bytes(just 24 bytes) is not > waste. > > About using per_cpu to replace SRCU, I suggest separate discussion. > Can you show the patch? This will make it easier to discuss. https://lore.kernel.org/linux-block/20200728134938.1505467-1-ming.lei@xxxxxxxxxx/ Thanks, Ming