Re: [PATCH V3 06/14] blk-mq-sched: don't dequeue request until all in ->dispatch are flushed

2017-09-01 Thread Bart Van Assche
On Fri, 2017-09-01 at 11:02 +0800, Ming Lei wrote: > That is a good question, but it has been answered by the comment > before checking the DISPATCH_BUSY state in blk_mq_sched_dispatch_requests(): > > /* >* If DISPATCH_BUSY is set, that means hw queue is busy >* and requests

Re: [PATCH V3 06/14] blk-mq-sched: don't dequeue request until all in ->dispatch are flushed

2017-08-31 Thread Bart Van Assche
On Thu, 2017-08-31 at 12:01 +0800, Ming Lei wrote: > On Wed, Aug 30, 2017 at 05:11:00PM +, Bart Van Assche wrote: > > On Sun, 2017-08-27 at 00:33 +0800, Ming Lei wrote: > > [ ... ] > > Shouldn't blk_mq_sched_dispatch_requests() set BLK_MQ_S_DISPATCH_BUSY just > > after > > the following

Re: [PATCH V3 06/14] blk-mq-sched: don't dequeue request until all in ->dispatch are flushed

2017-08-30 Thread Bart Van Assche
On Sun, 2017-08-27 at 00:33 +0800, Ming Lei wrote: > During dispatching, we moved all requests from hctx->dispatch to > one temporary list, then dispatch them one by one from this list. > Unfortunately duirng this period, run queue from other contexts ^^ during?

[PATCH V3 06/14] blk-mq-sched: don't dequeue request until all in ->dispatch are flushed

2017-08-26 Thread Ming Lei
During dispatching, we moved all requests from hctx->dispatch to one temporary list, then dispatch them one by one from this list. Unfortunately duirng this period, run queue from other contexts may think the queue is idle, then start to dequeue from sw/scheduler queue and still try to dispatch