public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Re: Disabling interrupts before block device request call
  2001-05-25 23:20 Disabling interrupts before block device request call Alexandr Andreev
@ 2001-05-25 22:01 ` Jens Axboe
  2001-05-28 19:24   ` Alexandr Andreev
  0 siblings, 1 reply; 3+ messages in thread
From: Jens Axboe @ 2001-05-25 22:01 UTC (permalink / raw)
  To: Alexandr Andreev; +Cc: linux-kernel

On Fri, May 25 2001, Alexandr Andreev wrote:
> Hi, list
> In ll_rw_block.c, before calling block device specific request function 
> ( i mean do_hd_request, do_ftl_request, ... ) the io_request_lock is 
> locking, and all interrupts are disabling. I know, that request handler 
> routine have to be atomic, but when we read data from a flash device ( 
> for example ) we use a timeouts. Where do we have to enable timer 
> interrupts, or should we disable all interrupts?

Even with dropping io_request_lock, it's not recommended to sleep inside
the request_fn. WIth plugging, you are basically preventing the other
plugged queues from being run until you return.

You could use a timer or similar to call you on a specified timeout
instead.

-- 
Jens Axboe


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Disabling interrupts before block device request call
@ 2001-05-25 23:20 Alexandr Andreev
  2001-05-25 22:01 ` Jens Axboe
  0 siblings, 1 reply; 3+ messages in thread
From: Alexandr Andreev @ 2001-05-25 23:20 UTC (permalink / raw)
  To: linux-kernel

Hi, list
In ll_rw_block.c, before calling block device specific request function 
( i mean do_hd_request, do_ftl_request, ... ) the io_request_lock is 
locking, and all interrupts are disabling. I know, that request handler 
routine have to be atomic, but when we read data from a flash device ( 
for example ) we use a timeouts. Where do we have to enable timer 
interrupts, or should we disable all interrupts?


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Disabling interrupts before block device request call
  2001-05-25 22:01 ` Jens Axboe
@ 2001-05-28 19:24   ` Alexandr Andreev
  0 siblings, 0 replies; 3+ messages in thread
From: Alexandr Andreev @ 2001-05-28 19:24 UTC (permalink / raw)
  To: Jens Axboe; +Cc: linux-kernel@vger.kernel.org

Jens Axboe wrote

>
>Even with dropping io_request_lock, it's not recommended to sleep inside
>the request_fn. WIth plugging, you are basically preventing the other
>plugged queues from being run until you return.
>
>You could use a timer or similar to call you on a specified timeout
>instead.
>
Does it mean, that if i need timer interrupts in my block device driver, 
i need to do sti() instead of unlock io_request_lock? Is there any 
common rule for device drivers in such case?




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2001-05-28 11:29 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-05-25 23:20 Disabling interrupts before block device request call Alexandr Andreev
2001-05-25 22:01 ` Jens Axboe
2001-05-28 19:24   ` Alexandr Andreev

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox