From mboxrd@z Thu Jan 1 00:00:00 1970 From: bvanassche@acm.org (Bart Van Assche) Date: Wed, 05 Sep 2018 08:57:17 -0700 Subject: [PATCH 2/3] blk-core: introduce queue close feature In-Reply-To: <1536120586-3378-3-git-send-email-jianchao.w.wang@oracle.com> References: <1536120586-3378-1-git-send-email-jianchao.w.wang@oracle.com> <1536120586-3378-3-git-send-email-jianchao.w.wang@oracle.com> Message-ID: <1536163037.11534.6.camel@acm.org> On Wed, 2018-09-05@12:09 +0800, Jianchao Wang wrote: > blk queue freeze is often used to prevent new IO from entering > request queue. However, becuase we kill the percpu-ref > q_usage_counter when freeze queue, we have to drain the request > queue when unfreeze. This is unnecessary for just preventing new > IO. In addition, If there is IO timeout or other issue when unfreeze > the queue, the scenario could be very tricky. > > So we introduce BLK_QUEUE_GATE_CLOSED to implement a light-weight > queue close feature base on the queue_gate to prevent new IO from > comming in queue which will not need to drain the queue any more. Does the "queue gate close" feature cause blk_get_request() / blk_mq_get_request() to block until blk_clear_queue_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.