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

Jared Hulbert jaredeh at gmail.com
Fri Aug 3 15:45:45 EDT 2007


> > > (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.

We can't very well just wait seconds for the chip to become available.
 We could count waiting processes, but even it there is one process in
the queue, seconds is a long time to wait.

> > 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.

Hmmm, we'd definitely benefit from having a hook in idle to trigger
the erase to resume.  Having hooks for entry into kernel space sounds
interesting, but if you leave it too quickly and suspend the erase you
don't make forward progress.  However, I'm not sure how you'd
determine whether a given process can continue without suspending the
erase.



More information about the linux-mtd mailing list