Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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

This reverts commit 9a0e609e3fd8a95c96629b9fbde6b8c5b9a1456a.
(Resolved a conflict during revert due to commit bfebd1cdb4 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.html

Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Cc: stable@vger.kernel.org # 4.1+

+2 -6
+2 -6
drivers/md/dm.c
··· 1067 1067 */ 1068 1068 static void rq_completed(struct mapped_device *md, int rw, bool run_queue) 1069 1069 { 1070 - int nr_requests_pending; 1071 - 1072 1070 atomic_dec(&md->pending[rw]); 1073 1071 1074 1072 /* nudge anyone waiting on suspend queue */ 1075 - nr_requests_pending = md_in_flight(md); 1076 - if (!nr_requests_pending) 1073 + if (!md_in_flight(md)) 1077 1074 wake_up(&md->wait); 1078 1075 1079 1076 /* ··· 1082 1085 if (run_queue) { 1083 1086 if (md->queue->mq_ops) 1084 1087 blk_mq_run_hw_queues(md->queue, true); 1085 - else if (!nr_requests_pending || 1086 - (nr_requests_pending >= md->queue->nr_congestion_on)) 1088 + else 1087 1089 blk_run_queue_async(md->queue); 1088 1090 } 1089 1091