From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from psmtp.com (na3sys010amx197.postini.com [74.125.245.197]) by kanga.kvack.org (Postfix) with SMTP id C24136B0007 for ; Sun, 27 Jan 2013 22:35:35 -0500 (EST) Received: by mail-pb0-f42.google.com with SMTP id rp2so1202110pbb.15 for ; Sun, 27 Jan 2013 19:35:35 -0800 (PST) Date: Sun, 27 Jan 2013 19:35:31 -0800 (PST) From: Hugh Dickins Subject: Re: [PATCH 5/11] ksm: get_ksm_page locked In-Reply-To: <1359333371.6763.12.camel@kernel> Message-ID: References: <1359254187.4159.10.camel@kernel> <1359333371.6763.12.camel@kernel> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-linux-mm@kvack.org List-ID: To: Simon Jeons Cc: Andrew Morton , Petr Holasek , Andrea Arcangeli , Izik Eidus , linux-kernel@vger.kernel.org, linux-mm@kvack.org On Sun, 27 Jan 2013, Simon Jeons wrote: > On Sun, 2013-01-27 at 14:08 -0800, Hugh Dickins wrote: > > On Sat, 26 Jan 2013, Simon Jeons wrote: > > > > > > Why the parameter lock passed from stable_tree_search/insert is true, > > > but remove_rmap_item_from_tree is false? > > > > The other way round? remove_rmap_item_from_tree needs the page locked, > > because it's about to modify the list: that's secured (e.g. against > > concurrent KSM page reclaim) by the page lock. > > How can KSM page reclaim path call remove_rmap_item_from_tree? I have > already track every callsites but can't find it. It doesn't. Please read what I said above again. > BTW, I'm curious about > KSM page reclaim, it seems that there're no special handle in vmscan.c > for KSM page reclaim, is it will be reclaimed similiar with normal > page? Look for PageKsm in mm/rmap.c. -- 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: email@kvack.org