* can generic_make_request in 2.4 kernel sleep?
@ 2004-02-28 16:06 Ming Zhang
2004-02-29 9:49 ` Jens Axboe
0 siblings, 1 reply; 2+ messages in thread
From: Ming Zhang @ 2004-02-28 16:06 UTC (permalink / raw)
To: LKML
Hi, I have a quick question.
In 2.4 kernel, can generic_make_request sleep?
I read the 2.4.24 kernel and find that there is printk in it. so i
assume it can sleep. if so, why the per queue make_request_fn can not
sleep base on the LDD book? and i do not see any place that the
io_request_lock is held. is this lock removed from system? or we do not
need this lock at this place any more?
and in md code, it use blk_queue_make_request to use its own request_fn
instead a queue, for example, in raid1_make_request(), it calls
raid1_alloc_r1ch() which also call schedule() if need, then this own
request_fn can sleep?
i think i am little confused about the LDD (linux device driver 2nd)
book and the new kernel code. can anybody point out some latest
reference for me?
thanks a bunch.
ming
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: can generic_make_request in 2.4 kernel sleep?
2004-02-28 16:06 can generic_make_request in 2.4 kernel sleep? Ming Zhang
@ 2004-02-29 9:49 ` Jens Axboe
0 siblings, 0 replies; 2+ messages in thread
From: Jens Axboe @ 2004-02-29 9:49 UTC (permalink / raw)
To: Ming Zhang; +Cc: LKML
On Sat, Feb 28 2004, Ming Zhang wrote:
> Hi, I have a quick question.
>
> In 2.4 kernel, can generic_make_request sleep?
yes
> I read the 2.4.24 kernel and find that there is printk in it. so i
> assume it can sleep. if so, why the per queue make_request_fn can not
> sleep base on the LDD book? and i do not see any place that the
> io_request_lock is held. is this lock removed from system? or we do not
> need this lock at this place any more?
>
> and in md code, it use blk_queue_make_request to use its own request_fn
> instead a queue, for example, in raid1_make_request(), it calls
> raid1_alloc_r1ch() which also call schedule() if need, then this own
> request_fn can sleep?
>
> i think i am little confused about the LDD (linux device driver 2nd)
> book and the new kernel code. can anybody point out some latest
> reference for me?
->make_request_fn() is not entered with the queue/io_request_lock. It
can sleep, it's not recommended since on writeout you are blocking
kswapd/bdflush.
--
Jens Axboe
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2004-02-29 9:50 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-02-28 16:06 can generic_make_request in 2.4 kernel sleep? Ming Zhang
2004-02-29 9:49 ` Jens Axboe
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox