Re: can generic_make_request in 2.4 kernel sleep?

From: Jens Axboe (axboe_at_suse.de)
Date: 02/29/04

  • Next message: Michael Frank: "Re: Why no interrupt priorities?"
    Date:	Sun, 29 Feb 2004 10:49:45 +0100
    To: Ming Zhang <mingz@ele.uri.edu>
    
    

    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
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at  http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at  http://www.tux.org/lkml/
    

  • Next message: Michael Frank: "Re: Why no interrupt priorities?"

    Relevant Pages

    • can generic_make_request in 2.4 kernel sleep?
      ... In 2.4 kernel, can generic_make_request sleep? ... I read the 2.4.24 kernel and find that there is printk in it. ... sleep base on the LDD book? ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: [SCHED] wrong priority calc - SIMPLE test case
      ... 2 to begin treating all new sleep as noninteractive (stern ... These are all /proc settings at the moment, so I can set set my starvation ... pain threshold from super duper desktop to just as fair as a ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: Post-halloween doc updates.
      ... > | have at least one working method of putting a laptop to sleep? ... > I have no problem putting the laptop to sleep. ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: High CPU temp on Athlon MP w/ recent 2.6 kernels
      ... >haven't got time to contact devs with that, but I do know for sure that ... >AFAIK my xmms uses OSS emulation and rhytmbox is native alsa.) ... >easily we go into sleep. ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: [patch] stop inotify from sending random DELETE_SELF event under load
      ... >>sleep for a day ... That fd may be available to multiple processes, ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)