From: Tejun Heo <htejun@gmail.com>
To: Ravi Krishnamurthy <Ravi_Krishnamurthy@adaptec.com>
Cc: linux-kernel@vger.kernel.org, axboe@suse.de
Subject: Re: Block driver freezes when using CFQ
Date: Mon, 30 Oct 2006 15:22:30 +0900 [thread overview]
Message-ID: <45459A26.9050409@gmail.com> (raw)
In-Reply-To: <4542FF94.4090005@adaptec.com>
Hello, Ravi.
First of all, it usually attracts more people if you include full source
code of something runnable.
Ravi Krishnamurthy wrote:
[--snip--]
> Several times during the test run, the while() loop in the request
> function comes out without dequeuing any request even though the
> elevator queue is not empty. (Confirmed by printing the return value of
> elv_queue_empty(), and the values of q->rq.count[] outside the loop).
Yeap, both cfq and anticipatory pause queue processing to improve
performance. This is a bit counter-intuitive at first but the loooong
seek time justifies such pauses if they can reduce seeks.
> After one such occurrence, the request function is not called at all
> and the device becomes unresponsive.
> I added some code that lets me trigger the request function from userspace.
> If I nudge the driver this way, I/Os continue for a short while and stop
> again.
>
> Since CFQ is the default I/O scheduler in current kernels, it has been
> widely used and tested. So I suspect I am not doing something right in my
> driver. Since the driver works well with the other schedulers, is there
> something CFQ-specific that I should take care of?
After such pauses, cfq does the needed 'nudging' by itself. cfq has
changed quite a bit so I might be mistaken but such 'nudging' ends up
calling blk_start_queueing() which either runs request_fn directly or
unplug the queue if plugged. So, does your driver's queue have proper
unplug function? How is your queue initialized? (you can see why it's
much better to post full working source.)
--
tejun
next prev parent reply other threads:[~2006-10-30 6:22 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-28 6:58 Block driver freezes when using CFQ Ravi Krishnamurthy
2006-10-30 6:22 ` Tejun Heo [this message]
[not found] <454313C9.4010602@adaptec.com>
2006-10-30 8:22 ` [Fwd: Block driver freezes when using CFQ] Jens Axboe
2006-10-31 4:57 ` Block driver freezes when using CFQ Ravi Krishnamurthy
2006-10-31 7:10 ` 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=45459A26.9050409@gmail.com \
--to=htejun@gmail.com \
--cc=Ravi_Krishnamurthy@adaptec.com \
--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