From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Stephen C. Tweedie" MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <14337.64699.741408.60931@dukat.scot.redhat.com> Date: Mon, 11 Oct 1999 16:05:31 +0100 (BST) Subject: Re: locking question: do_mmap(), do_munmap() In-Reply-To: References: Sender: owner-linux-mm@kvack.org Return-Path: To: Andrea Arcangeli Cc: Alexander Viro , Manfred Spraul , linux-kernel@vger.rutgers.edu, "linux-mm@kvack.org" , Stephen Tweedie List-ID: Hi, On Sat, 9 Oct 1999 18:01:27 +0200 (CEST), Andrea Arcangeli said: > On Sat, 9 Oct 1999, Alexander Viro wrote: >> do_munmap() doesn't need the big lock. do_mmap() callers should grab > Look the swapout path. Without the big kernel lock you'll free vmas under > swap_out(). Yes. The swapout code relies on the big lock to freeze the vma, and on the page_table_lock to protect the ptes, so that it can avoid worrying about the mm_sem at all. If munmap ever drops vmas without the big lock, the swapper _will_ break. Making this into a per-mm lock would not be hard, btw. --Stephen -- 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/