Re: [PATCH 2/3] blk-core: introduce queue close feature

From: Bart Van Assche
Date: Wed Sep 05 2018 - 11:57:55 EST


On Wed, 2018-09-05 at 12:09 +-0800, Jianchao Wang wrote:
+AD4 blk queue freeze is often used to prevent new IO from entering
+AD4 request queue. However, becuase we kill the percpu-ref
+AD4 q+AF8-usage+AF8-counter when freeze queue, we have to drain the request
+AD4 queue when unfreeze. This is unnecessary for just preventing new
+AD4 IO. In addition, If there is IO timeout or other issue when unfreeze
+AD4 the queue, the scenario could be very tricky.
+AD4
+AD4 So we introduce BLK+AF8-QUEUE+AF8-GATE+AF8-CLOSED to implement a light-weight
+AD4 queue close feature base on the queue+AF8-gate to prevent new IO from
+AD4 comming in queue which will not need to drain the queue any more.

Does the +ACI-queue gate close+ACI feature cause blk+AF8-get+AF8-request() /
blk+AF8-mq+AF8-get+AF8-request() to block until blk+AF8-clear+AF8-queue+AF8-closed() is called? If
so, I think we need a better name for this feature. How about calling these
two operations suspend and resume?

Thanks,

Bart.