Re: [PATCH] blk-mq: don't lose requests if a stopped queue restarts

2015-05-04 Thread Jens Axboe
On 05/04/2015 02:20 PM, Shaohua Li wrote: On Mon, May 04, 2015 at 01:56:42PM -0600, Jens Axboe wrote: On 05/04/2015 01:51 PM, Shaohua Li wrote: On Mon, May 04, 2015 at 01:17:19PM -0600, Jens Axboe wrote: On 05/02/2015 06:31 PM, Shaohua Li wrote: Normally if driver is busy to dispatch a reques

Re: [PATCH] blk-mq: don't lose requests if a stopped queue restarts

2015-05-04 Thread Shaohua Li
of start/stop bits, one used exclusively by the > driver and one used exclusively by blk-mq. Then blk-mq could restart > the queue on completion of a request, since it would then know that > blk-mq was the one that stopped it. Agree. I'll make the rerun async for now and leave abov

Re: [PATCH] blk-mq: don't lose requests if a stopped queue restarts

2015-05-04 Thread Jens Axboe
On 05/04/2015 01:51 PM, Shaohua Li wrote: On Mon, May 04, 2015 at 01:17:19PM -0600, Jens Axboe wrote: On 05/02/2015 06:31 PM, Shaohua Li wrote: Normally if driver is busy to dispatch a request the logic is like below: block layer:driver: __blk_mq_run_

Re: [PATCH] blk-mq: don't lose requests if a stopped queue restarts

2015-05-04 Thread Shaohua Li
On Mon, May 04, 2015 at 01:17:19PM -0600, Jens Axboe wrote: > On 05/02/2015 06:31 PM, Shaohua Li wrote: > >Normally if driver is busy to dispatch a request the logic is like below: > >block layer: driver: > > __blk_mq_run_hw_queue > >a.

Re: [PATCH] blk-mq: don't lose requests if a stopped queue restarts

2015-05-04 Thread Jens Axboe
On 05/02/2015 06:31 PM, Shaohua Li wrote: Normally if driver is busy to dispatch a request the logic is like below: block layer:driver: __blk_mq_run_hw_queue a. blk_mq_stop_hw_queue b. rq add to ctx->dis

[PATCH] blk-mq: don't lose requests if a stopped queue restarts

2015-05-02 Thread Shaohua Li
Normally if driver is busy to dispatch a request the logic is like below: block layer:driver: __blk_mq_run_hw_queue a. blk_mq_stop_hw_queue b. rq add to ctx->dispatch later: 1.