NFTL Performance
David Woodhouse
dwmw2 at infradead.org
Tue Feb 6 14:08:44 EST 2001
On Tue, 6 Feb 2001, Ian Eure <Ian Eure wrote:
> a more important problem that i see is that when blocks are being
> flushed to the DOC, certain parts of the system (mouse, maybe others) stop
> responding until the write is complete.
More likely to be the busy-wait in _DoC_WaitReady():
while (!(ReadDOC(docptr, CDSNControl) & CDSN_CTRL_FR_B) && --c)
;
Try...
while (!(ReadDOC(docptr, CDSNControl) & CDSN_CTRL_FR_B) && --c) {
if (current->need_resched)
schedule();
else
udelay(1);
}
But I think you have to protect against being re-entered by using a
'state' variable to mark that you're currently writing to the chip, and
probably also a spinlock to protect that state variable. The NOR flash
drivers do all this if you're after an example.
--
dwmw2
To unsubscribe, send "unsubscribe mtd" to majordomo at infradead.org
More information about the linux-mtd
mailing list