Disk blocks for long periods

Joakim Tjernlund joakim.tjernlund at lumentis.se
Thu Aug 8 05:15:05 EDT 2002


> 
> joakim.tjernlund at lumentis.se said:
> >  You can move the wake_up() call up one step(xxxx_write_words()) and
> > call it just before  you leave that function. I tried that and it's a
> > improvement(note, I using buffer writes, so word writes should see an
> > even better improvement), but that will also hold reads back(not that
> > I noticed anything) until xxx_write_words has completed.  We can fix
> > that by having separate wait queues for read and erase. 
> 
> Aren't reads held back anyway for the same reason that erases are -- by the 
> time we actually schedule after waking them, the chip is in FL_WRITING 
> again?

Yes, that why you need 2 queues. Then you do wake_up()&cond_resched(). 
The read queue get woken after every word/buffer write and
the erase queue after the whole read/write has completed.

> 
> What happens if you stick a cond_resched() immediately after the wake_up() 
> (ok, after the spin_unlock).?

I had that before I moved wake_up one step. My copy test was improved
with almost 1 sec(from ~10 to ~9) when the wake_up()&cond_resched() was one step up.

 Jocke
> 
> --
> dwmw2
> 
> 
> 





More information about the linux-mtd mailing list