From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Thu, 31 Jul 2003 12:12:08 -0400 (EDT) From: "Raghu R. Arur" Subject: Re: Understanding page faults code in mm/memory.c In-Reply-To: Message-ID: References: <20030731111502.GA1591@eugeneteo.net> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-linux-mm@kvack.org Return-Path: To: Mel Gorman Cc: Eugene Teo , linux-mm@kvack.org List-ID: > > > [3] in mm/memory.c, in do_wp_page, I am not sure what the > > portion of code is about: > > > > // If old_page bit is not set, set it, and test. > > if (!TryLockPage(old_page) { > > > > // [QN:] I don't understand what can_share_swap_page() do > > // I tried tracing, but i still don't quite get it. > > int reuse = can_share_swap_page(old_page); > > Basically it'll determine if you are the only user of that swap page. If > it returns true, it means that you are the last process to break COW on > that page so just use it. Otherwise it'll fall through and a new page will > be allocated. But when you put a page on to the swap cache will not the rss of the address spage decrease. if not then when will the rss value of the address space change. thanks, Raghu -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: aart@kvack.org