public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: Alexandr Andreev <andreev@niisi.msk.ru>
To: David Woodhouse <dwmw2@infradead.org>
Cc: "linux-mtd@lists.infrared.org" <linux-mtd@lists.infradead.org>
Subject: Re: Why timer interrupt is disabled?
Date: Fri, 25 May 2001 20:17:50 -0400	[thread overview]
Message-ID: <3B0EF62E.30207@niisi.msk.ru> (raw)
In-Reply-To: 25506.990803856@redhat.com

David Woodhouse wrote:

>andreev@niisi.msk.ru said:
>
>>I know that JFFS is the better choice, but
>>I must use the FTL driver, because there is installed X-server on my 
>>flash partition... 
>>
>I don't see the logic. The Compaq iPAQ works quite well with the X-server 
>in the JFFS2 filesystem.
>
I don`t want to format my flash partition write now. Besides it doesn`t 
matter. Of course i`ll use JFFS in the future. 

>>I think that unlocking of the io_request_lock inside ftl driver
>>is not a good idea, because the do_ftl_request must be atomic.
>>
>My understanding is that it's perfectly safe to drop the io_request_lock as long as we only look at the request at the head of the queue. There's no 
>need for do_ftl_request to be atomic - and in fact it cannot be atomic 
>because the flash read and write calls may sleep.
>
   I think, if write call sleeps, than we must return. Do i wrong?
   Locking of io_request_lock and disabling interrupts, are mading in 
block devices common driver. I read the kernel-api documentation in 
Documentation/DocBook/kernel-api/r10011.html: " A global spin lock 
$io_request_lock must be held while manipulating the requests on the 
request queue."
   Besides, if we unlock the io_request_lock and enable all interrupts 
it might to occur this thing:
While we are reading or writing data to the flash, the timer interrupt 
is happens. Next, the schedule() called, and an other process begins to 
write or read data to the flash. Can you guarantee, that flash is 
protected by locks and "chips->state" inside the CFI driver? I mean: if 
we write the READ_STATUS command to flash inside context of first 
process, and trying to read data inside context of second process, than 
we read status, but not data. 
   In all cases we need to enable timer ticks, anywhere in flash. It is 
the simplies way i think...

  reply	other threads:[~2001-05-25 16:16 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-05-25 13:04 Why timer interrupt is disabled? 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 [this message]
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
     [not found] <3B0EE8CF.7040502@niisi.msk.ru>
     [not found] ` <20010526000119.A23273@suse.de>
2001-05-28 19:07   ` Alexandr Andreev
2001-05-28 15: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=3B0EF62E.30207@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