From: Jens Axboe <jens.axboe@oracle.com>
To: "Gao, Yunpeng" <yunpeng.gao@intel.com>
Cc: "linux-ide@vger.kernel.org" <linux-ide@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: help! locks problem in block layer request queue?
Date: Mon, 23 Feb 2009 08:18:02 +0100 [thread overview]
Message-ID: <20090223071802.GK29783@kernel.dk> (raw)
In-Reply-To: <38D9F46DFF92C54980D2F2C1E8EE3130248428D8@pdsmsx503.ccr.corp.intel.com>
(please don't top post reply to emails...)
On Sat, Feb 21 2009, Gao, Yunpeng wrote:
> Really awesome! This is a big bug. I have re-write the code of
> processing requests from the request queue. The new code is copied
> from drivers/mtd/mtd_blkdevs.c and did some necessary modifies. Now it
> works well. Many thanks to you :)
Glad that it now works :-)
> BTW, I noticed that MTD driver (drivers/mtd/mtd_blkdevs.c) and MMC
> driver (drivers/mmc/card/block.c and queue.c) also register a block
> device, and they create a kernel thread to process the request queue
> instead of process it directly. Why they do it like that? Is there any
> special reason for that?
If your request handling is slow, then it is often better to push
request handling to a dedicated thread. That may be the case if your
device can't do DMA for instance, and you have to transfer all the data
manually. Pushing that to a thread usually makes it easy to do that with
interrupts enabled and is thus nicer to the rest of the system.
--
Jens Axboe
prev parent reply other threads:[~2009-02-23 7:20 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-19 11:53 help! locks problem in block layer request queue? Gao, Yunpeng
2009-02-19 13:13 ` Jens Axboe
2009-02-21 9:24 ` Gao, Yunpeng
2009-02-23 7:18 ` Jens Axboe [this message]
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=20090223071802.GK29783@kernel.dk \
--to=jens.axboe@oracle.com \
--cc=linux-ide@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=yunpeng.gao@intel.com \
/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;
as well as URLs for NNTP newsgroup(s).