mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Tejun Heo <htejun@gmail.com>
To: axboe@suse.de, akpm@osdl.org
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH 2.6.12-rc5-mm1] CFQ: fix stall on force dispatch
Date: Sun, 29 May 2005 11:54:17 +0900	[thread overview]
Message-ID: <20050529025416.GA11008@htj.dyndns.org> (raw)

 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);

                 reply	other threads:[~2005-05-29  2:54 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050529025416.GA11008@htj.dyndns.org \
    --to=htejun@gmail.com \
    --cc=akpm@osdl.org \
    --cc=axboe@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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®