From: Oleg Nesterov <oleg@tv-sign.ru>
To: Jens Axboe <axboe@kernel.dk>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Nick <gentuu@gmail.com>,
linux-kernel@vger.kernel.org
Subject: [PATCH] cfq: fix IOPRIO_CLASS_IDLE delays
Date: Tue, 6 Nov 2007 23:05:10 +0300 [thread overview]
Message-ID: <20071106200510.GA11435@tv-sign.ru> (raw)
After the fresh boot:
ionice -c3 -p $$
echo cfq >> /sys/block/XXX/queue/scheduler
dd if=/dev/XXX of=/dev/null bs=512 count=1
Now dd hangs in D state and the queue is completely stalled for approximately
INITIAL_JIFFIES + CFQ_IDLE_GRACE jiffies. This is because cfq_init_queue()
forgets to initialize cfq_data->last_end_request.
(I guess this patch is not complete, overflow is still possible)
Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru>
--- cfq/block/cfq-iosched.c~ 2007-08-09 19:59:26.000000000 +0400
+++ cfq/block/cfq-iosched.c 2007-11-06 22:39:08.000000000 +0300
@@ -2122,6 +2122,7 @@ static void *cfq_init_queue(struct reque
INIT_WORK(&cfqd->unplug_work, cfq_kick_queue);
+ cfqd->last_end_request = jiffies;
cfqd->cfq_quantum = cfq_quantum;
cfqd->cfq_fifo_expire[0] = cfq_fifo_expire[0];
cfqd->cfq_fifo_expire[1] = cfq_fifo_expire[1];
next reply other threads:[~2007-11-06 19:00 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-06 20:05 Oleg Nesterov [this message]
2007-11-06 19:26 ` Jens Axboe
2007-11-07 13:48 ` Oleg Nesterov
2007-11-07 12:50 ` Jens Axboe
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=20071106200510.GA11435@tv-sign.ru \
--to=oleg@tv-sign.ru \
--cc=akpm@linux-foundation.org \
--cc=axboe@kernel.dk \
--cc=gentuu@gmail.com \
--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®