[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: locking question: do_mmap(), do_munmap()
On Sun, 10 Oct 1999, Alexander Viro wrote:
>sys_swapoff(). It's a syscall. Andrea, could you show a scenario for
do_page_fault -> down() -> GFP -> swap_out() -> down() -> deadlock
To grab the mm semaphore in swap_out we could swap_out only from kswapd
doing a kind of wakeup_and_wait_kswapd() ala wakeup_bdflush(1) but it would
be slow and I don't want to run worse than in 2.2.x in UP to get some more
SMP scalability in SMP (that won't pay the cost).
The other option is to make the mmap semaphore recursive checking that GFP
is not called in the middle of a vma change. I don't like this one it sound
not robust as the spinlock way to me (see below).
What I like is to go as in 2.2.x with a proper spinlock for doing vma
reads (I am _not_ talking about the big kernel lock!).
Andrea
--
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/