lkml.org 
[lkml]   [2009]   [Feb]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: help! locks problem in block layer request queue?

(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



\
 
 \ /
  Last update: 2009-02-23 08:23    [W:0.061 / U:0.060 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site