[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: locking question: do_mmap(), do_munmap()
On Mon, 11 Oct 1999, Stephen C. Tweedie wrote:
> The swapper has very strict requirements: to avoid blocking it requires
> the big lock and the page table spinlocks, so that it can survive
> without the mm semaphore. Adding the mm semaphore to the swapout loop
> is not really an option. That means that you need the kernel lock when
> modifying vma lists.
Ouch...
> We can, however, improve things by using a per-mm spinlock instead of
> using the kernel lock to provide that guarantee.
->swapout() may block. We have three areas here:
1. vma accesses in swapper.
2. vma list reads outside of swapper.
3. vma modifications/destruction.
Looks like we need exclusion between 1 and 3 (on per-mm basis, that is).
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://humbolt.geo.uu.nl/Linux-MM/