Skip to content

Commit

Permalink
blk-mq: use blk_mq_start_hw_queues() when running requeue work
Browse files Browse the repository at this point in the history
When requests are retried due to hw or sw resource shortages,
we often stop the associated hardware queue. So ensure that we
restart the queues when running the requeue work, otherwise the
queue run will be a no-op.

Signed-off-by: Jens Axboe <axboe@fb.com>
  • Loading branch information
Jens Axboe committed Sep 22, 2014
1 parent 6b55e1f commit 8b95741
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion block/blk-mq.c
Original file line number Diff line number Diff line change
Expand Up @@ -479,7 +479,11 @@ static void blk_mq_requeue_work(struct work_struct *work)
blk_mq_insert_request(rq, false, false, false);
}

blk_mq_run_queues(q, false);
/*
* Use the start variant of queue running here, so that running
* the requeue work will kick stopped queues.
*/
blk_mq_start_hw_queues(q);
}

void blk_mq_add_to_requeue_list(struct request *rq, bool at_head)
Expand Down

0 comments on commit 8b95741

Please sign in to comment.