Re: [PATCH]: uClinux (MMU-less) patches against 2.5.28

David Woodhouse
2002-07-26T14:00:22Z

alan@lxorguk.ukuu.org.uk said:
> Anything where you rely on locking the pages and can get a loop of
> locked/absent pages and deadlock

Good point -- so if a writer encounters a locked page when it's trying to
unmap them all, it needs to still allow other pages to be mapped in while
it waits for the original page to become unlocked. That avoids the deadlock
-- but leaves us with the potential for livelock, with the writer being
starved by too many other things locking down the pages in question.

I suspect the number of pages getting locked will be sufficiently small
that the deadlock does not occur.

In what circumstances will such mmapped pages get locked?

The case of O_DIRECT or rawio writes to flash is easily avoided -- just
don't allow raw or O_DIRECT writes to flash from _anywhere_ while XIP is in
use. O_DIRECT and rawio to other destinations is fine. What else? Assume
we don't permit mlock() :)

--
dwmw2