Commit 621739b0 authored by Mike Snitzer's avatar Mike Snitzer

Revert "dm: only run the queue on completion if congested or no requests pending"

This reverts commit 9a0e609e.
(Resolved a conflict during revert due to commit bfebd1cd that came
after)

This revert is motivated by a couple failure reports on request-based DM
multipath testbeds:
1) Netapp reported that their multipath fault injection test under heavy
   IO load can stall longer than 300 seconds.
2) IBM reported elevated lock contention in their testbed (likely due to
   increased back pressure due to IO not being dispatched as quickly):
   https://www.redhat.com/archives/dm-devel/2015-July/msg00057.htmlSigned-off-by: default avatarMike Snitzer <snitzer@redhat.com>
Cc: stable@vger.kernel.org # 4.1+
parent 1c751879
...@@ -1067,13 +1067,10 @@ static void rq_end_stats(struct mapped_device *md, struct request *orig) ...@@ -1067,13 +1067,10 @@ static void rq_end_stats(struct mapped_device *md, struct request *orig)
*/ */
static void rq_completed(struct mapped_device *md, int rw, bool run_queue) static void rq_completed(struct mapped_device *md, int rw, bool run_queue)
{ {
int nr_requests_pending;
atomic_dec(&md->pending[rw]); atomic_dec(&md->pending[rw]);
/* nudge anyone waiting on suspend queue */ /* nudge anyone waiting on suspend queue */
nr_requests_pending = md_in_flight(md); if (!md_in_flight(md))
if (!nr_requests_pending)
wake_up(&md->wait); wake_up(&md->wait);
/* /*
...@@ -1085,8 +1082,7 @@ static void rq_completed(struct mapped_device *md, int rw, bool run_queue) ...@@ -1085,8 +1082,7 @@ static void rq_completed(struct mapped_device *md, int rw, bool run_queue)
if (run_queue) { if (run_queue) {
if (md->queue->mq_ops) if (md->queue->mq_ops)
blk_mq_run_hw_queues(md->queue, true); blk_mq_run_hw_queues(md->queue, true);
else if (!nr_requests_pending || else
(nr_requests_pending >= md->queue->nr_congestion_on))
blk_run_queue_async(md->queue); blk_run_queue_async(md->queue);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment