Re: [PATCH v1 3/3] blk-mq: start to freeze queue just after setting dying

2017-03-18 Thread Hannes Reinecke
On 03/17/2017 10:57 AM, Ming Lei wrote: > Before commit 780db2071a(blk-mq: decouble blk-mq freezing > from generic bypassing), the dying flag is checked before > entering queue, and Tejun converts the checking into .mq_freeze_depth, > and assumes the counter is increased just after dying flag > is

Re: [PATCH v1 3/3] blk-mq: start to freeze queue just after setting dying

2017-03-17 Thread Ming Lei
On Fri, Mar 17, 2017 at 11:26:26PM +, Bart Van Assche wrote: > On Fri, 2017-03-17 at 17:57 +0800, Ming Lei wrote: > > Given blk_set_queue_dying() is always called in remove path > > of block device, and queue will be cleaned up later, we don't > > need to worry about undoing the counter. > > >

Re: [PATCH v1 3/3] blk-mq: start to freeze queue just after setting dying

2017-03-17 Thread Bart Van Assche
On Fri, 2017-03-17 at 17:57 +0800, Ming Lei wrote: > Given blk_set_queue_dying() is always called in remove path > of block device, and queue will be cleaned up later, we don't > need to worry about undoing the counter. > > diff --git a/block/blk-core.c b/block/blk-core.c > index d772c221cc17..62d

Re: [PATCH v1 3/3] blk-mq: start to freeze queue just after setting dying

2017-03-17 Thread Bart Van Assche
On Sat, 2017-03-18 at 02:32 +0800, Ming Lei wrote: > On Sat, Mar 18, 2017 at 1:32 AM, Bart Van Assche wrote: > > + /* > > +* Avoid that the updates of the queue flags and q_usage_counter > > +* are reordered. > > +*/ > > + smp_wmb(); > > atomic_inc_return() in b

Re: [PATCH v1 3/3] blk-mq: start to freeze queue just after setting dying

2017-03-17 Thread Ming Lei
On Sat, Mar 18, 2017 at 1:32 AM, Bart Van Assche wrote: > On Fri, 2017-03-17 at 17:57 +0800, Ming Lei wrote: >> Before commit 780db2071a(blk-mq: decouble blk-mq freezing >> from generic bypassing), the dying flag is checked before >> entering queue, and Tejun converts the checking into .mq_freeze_

Re: [PATCH v1 3/3] blk-mq: start to freeze queue just after setting dying

2017-03-17 Thread Bart Van Assche
On Fri, 2017-03-17 at 17:57 +0800, Ming Lei wrote: > Before commit 780db2071a(blk-mq: decouble blk-mq freezing > from generic bypassing), the dying flag is checked before > entering queue, and Tejun converts the checking into .mq_freeze_depth, > and assumes the counter is increased just after dying