* [PATCH 2.6.12-rc5-mm1] CFQ: fix stall on force dispatch
@ 2005-05-29 2:54 Tejun Heo
0 siblings, 0 replies; only message in thread
From: Tejun Heo @ 2005-05-29 2:54 UTC (permalink / raw)
To: axboe, akpm; +Cc: linux-kernel
Hello, Jens.
Hello, Andrew.
The cfq-cfq-elevator_insert_back-fix.patch contains a bug which is
triggered if force dispatching (back insertion) occurs when the active
cfqq is in idle slice while there exist other requests on other cfqqs.
In this case, the idle slice timer is removed without invoking the
timer handler, so CFQ itself doesn't run the queue. Also, as the
queue wasn't empty when the elv_add_request() is invoked, the blk
layer won't kick the queue on return. This results in queue stall.
This patch removes the stall by kicking the queue after force
dispatching.
Signed-off-by: Tejun Heo <htejun@gmail.com>
Index: blk-fixes/drivers/block/cfq-iosched.c
===================================================================
--- blk-fixes.orig/drivers/block/cfq-iosched.c 2005-05-29 11:29:51.000000000 +0900
+++ blk-fixes/drivers/block/cfq-iosched.c 2005-05-29 11:29:54.000000000 +0900
@@ -1705,6 +1705,14 @@ cfq_insert_request(request_queue_t *q, s
while (cfq_dispatch_requests(q, INT_MAX, 1))
;
list_add_tail(&rq->queuelist, &q->queue_head);
+ /*
+ * If we were idling with pending requests on
+ * inactive cfqqs, force dispatching will
+ * remove the idle timer and the queue won't
+ * be kicked by __make_request() afterward.
+ * Kick it here.
+ */
+ kblockd_schedule_work(&cfqd->unplug_work);
break;
case ELEVATOR_INSERT_FRONT:
list_add(&rq->queuelist, &q->queue_head);
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2005-05-29 2:54 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-05-29 2:54 [PATCH 2.6.12-rc5-mm1] CFQ: fix stall on force dispatch Tejun Heo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®