From: Alexandr Andreev <andreev@niisi.msk.ru>
To: dwmw2@infradead.org
Cc: "linux-mtd@lists.infrared.org" <linux-mtd@lists.infradead.org>
Subject: Re: Why timer interrupt is disabled?
Date: Mon, 28 May 2001 15:07:46 -0400 [thread overview]
Message-ID: <3B12A202.3040409@niisi.msk.ru> (raw)
In-Reply-To: 20010526000119.A23273@suse.de
I had asked this question to linux-kernel@vger.kernel.org and there is
the answer:
Jens Axboe wrote:
>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.
>
... and nevertheless, this is a bad idea to unlock the io_request_lock
inside the do_ftl_request. What about the SMP? It may happen that one
CPU is reading and other CPU is writing data at the same time. So, the
flash memory can return status value instead of data, for example. Does
the chip->mutex lock provides necessary synchronization?
I look at the other block device drivers code and found, that io_request
handlers do sti() in some cases. If you still don`t want to do it, we
could use a softirq. In the do_fd_request(), the "bottom halves" is used
for example. We could use a "bottom halves" or even a tasklet in our
case. What do you think about this?
next parent reply other threads:[~2001-05-28 11:19 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <3B0EE8CF.7040502@niisi.msk.ru>
[not found] ` <20010526000119.A23273@suse.de>
2001-05-28 19:07 ` Alexandr Andreev [this message]
2001-05-28 15:36 ` Why timer interrupt is disabled? David Woodhouse
2001-05-25 13:04 andreev
2001-05-25 13:12 ` David Woodhouse
[not found] ` <3B0EE338.1000701@niisi.msk.ru>
2001-05-25 15:17 ` David Woodhouse
2001-05-26 0:17 ` Alexandr Andreev
2001-05-25 16:37 ` David Woodhouse
2001-05-25 17:06 ` Herman Oosthuysen
2001-05-26 1:31 ` Alexandr Andreev
2001-05-25 17:36 ` David Woodhouse
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=3B12A202.3040409@niisi.msk.ru \
--to=andreev@niisi.msk.ru \
--cc=dwmw2@infradead.org \
--cc=linux-mtd@lists.infradead.org \
/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