Skip to contentSkip to conversation

dm: run queue on re-queue

PATCH In review Junichi Nomura 2 participants 2 messages May 26, 2015 Device mapper

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 dm: run queue on re-queue

Without kicking queue, requeued request may stay forever in the queue if there are no other I/O activities to the device.

The original error had been in v2.6.39 with commit 7eaceaccab5f ("block: remove per-queue plugging"), which replaced conditional plugging by periodic runqueue.

Commit 9d1deb83d489 in v4.1-rc1 removed the periodic runqueue and the problem started to manifest.

Fixes 9d1deb83d489 ("dm: don't schedule delayed run of the queue if nothing to do")
drivers/md/dm.c +1 -0
index a930b72..0bf79a0 100644
@@ -1164,6 +1164,7 @@ static void old_requeue_request(struct request *rq)
 
 	spin_lock_irqsave(q->queue_lock, flags);
 	blk_requeue_request(q, rq);
+	blk_run_queue_async(q);
 	spin_unlock_irqrestore(q->queue_lock, flags);
 }
 
#1 lore raw
Quoted 18 lines · Junichi Nomura

Without kicking queue, requeued request may stay forever in the queue if there are no other I/O activities to the device.

The original error had been in v2.6.39 with commit 7eaceaccab5f ("block: remove per-queue plugging"), which replaced conditional plugging by periodic runqueue.

Commit 9d1deb83d489 in v4.1-rc1 removed the periodic runqueue and the problem started to manifest.

Fixes 9d1deb83d489 ("dm: don't schedule delayed run of the queue if nothing to do")
drivers/md/dm.c +0 -0
index a930b72..0bf79a0 100644

drivers/md/dm.c static void old_requeue_request(struct request *rq) · line 1169

Quoted 6 lines
drivers/md/dm.c +1 -0
@@ -1164,6 +1164,7 @@ static void old_requeue_request(struct request *rq)
 
 	spin_lock_irqsave(q->queue_lock, flags);
 	blk_requeue_request(q, rq);
+	blk_run_queue_async(q);
 	spin_unlock_irqrestore(q->queue_lock, flags);
 }

Thanks Junichi. The new blk-mq path did kick the queue, but obviously the old request_fn path didn't. I'll get this queued for 4.1.

Mike