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
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/