Messages in this thread | | | Date | Sun, 10 Oct 1999 19:12:58 +0200 (CEST) | From | Andrea Arcangeli <> | Subject | 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 from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |