dm mpath: requeue after a small delay if blk_get_request() fails
authorBart Van Assche <bart.vanassche@sandisk.com>
Fri, 7 Apr 2017 23:50:44 +0000 (16:50 -0700)
committerMike Snitzer <snitzer@redhat.com>
Mon, 24 Apr 2017 19:06:19 +0000 (15:06 -0400)
commit06eb061f48594aa369f6e852b352410298b317a8
tree02c868ed14c9682c49a4f469edad71d730413fd8
parent117aceb030307dcd431fdcff87ce988d3016c34a
dm mpath: requeue after a small delay if blk_get_request() fails

If blk_get_request() returns ENODEV then multipath_clone_and_map()
causes a request to be requeued immediately. This can cause a kworker
thread to spend 100% of the CPU time of a single core in
__blk_mq_run_hw_queue() and also can cause device removal to never
finish.

Avoid this by only requeuing after a delay if blk_get_request() fails.
Additionally, reduce the requeue delay.

Cc: stable@vger.kernel.org # 4.9+
Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
drivers/md/dm-mpath.c
drivers/md/dm-rq.c