[PATCH][MTD] mtdpart.c: allow other drivers to get physical address of partition

Jörn Engel joern at logfs.org
Fri Aug 3 09:18:15 EDT 2007


On Fri, 3 August 2007 14:09:03 +0100, David Woodhouse wrote:
> 
> > If you get a fault it gets routed to the filesystem .fault or
> > something like that.  The .fault routine can:
> > (a) suspend the erase
> > (b) copy the page to RAM
> > (c) update the pte to point to RAM
> > (d) resume the erase
> 
> This could lead to all your data pages ending up in RAM, which kind of
> defeats the object of XIP.
> 
> > -or-
> > (a) suspend the erase
> > (b) reenable the pte
> > (c) wait a short time
> > (d) disable pte again
> > (e) resume the erase
> 
> Alternatively, just wait for the chip to become available. Or increment
> a count of 'waiters' and only interrupt the erase when there are a
> certain number of people waiting.
> 
> Perhaps we want to set it up so that _if_ there is a process which can
> continue, it'll do so. Only when there's nothing runnable in userspace
> do we suspend an erase? In that case, perhaps we'd want some kind of
> hook in the idle loop?

Or we could just always suspend the erase and resume it the next time we
enter the kernel, either via system call or interrupt.  Should allow the
process to make some progress without starving the erase.  Would need
hooks as well, just in different places.

Jörn

-- 
This above all: to thine own self be true.
-- Shakespeare



More information about the linux-mtd mailing list