All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Woodhouse <dwmw2@infradead.org>
To: David Schleef <ds@schleef.org>
Cc: mtd@infradead.org
Subject: Re: sharp driver dissimilarities
Date: Sat, 28 Apr 2001 18:26:26 +0100	[thread overview]
Message-ID: <19377.988478786@redhat.com> (raw)
In-Reply-To: <20010428101555.A22768@stm.lbl.gov>


ds@schleef.org said:
>  The write process uses word_write_time and adjusts it so that it
> settles at the average write time.  The problem with that method is
> that half the time, you will be sleeping for 10 ms on something that
> may finish in 1 more usec of waiting.

We only sleep for that long if current->need_resched.

But you're right that udelay() is fairly pointless - we should just spin 
polling the flash. Assuming there aren't power consumption issues - but as 
udelay is always a CPU spin anyway, I think that's OK.


ds@schleef.org said:
>  A similar thing is true about block erase -- the schedule_timeout(HZ)
> means that the earliest time the driver will notice that the chip is
> done erasing is 1 s. 

There's a tradeoff here between performance of the flash driver and 
performance of the rest of the system. We should probably sleep only if 
current->need_resched, I suppose.


ds@schleef.org said:
>  I also didn't understand how the locking was supposed to work, so I
> rewrote it in the sharp driver.  I like it better. 

The problem with having a single generic _wait function is that they're not 
actually the same. When you want to read, you can interrupt erases or 
writes. When you want to write, you can interrupt erases.

--
dwmw2




To unsubscribe, send "unsubscribe mtd" to majordomo@infradead.org

      reply	other threads:[~2001-04-28 17:26 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-04-26 15:55 Power blackouts and brownouts Vipin Malik
2001-04-27  7:39 ` Joakim Tjernlund
2001-04-27 14:30   ` Vipin Malik
2001-04-27 14:34     ` David Woodhouse
2001-04-27 15:31       ` Vipin Malik
2001-04-27 20:37       ` David Schleef
2001-04-28 10:34         ` David Woodhouse
2001-04-28 16:00           ` sharp driver dissimilarities David Schleef
2001-04-28 16:11             ` David Woodhouse
2001-04-28 17:15               ` David Schleef
2001-04-28 17:26                 ` David Woodhouse [this message]

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=19377.988478786@redhat.com \
    --to=dwmw2@infradead.org \
    --cc=ds@schleef.org \
    --cc=mtd@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.