From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755572Ab2LLWh4 (ORCPT ); Wed, 12 Dec 2012 17:37:56 -0500 Received: from mx1.redhat.com ([209.132.183.28]:40011 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755300Ab2LLWhy (ORCPT ); Wed, 12 Dec 2012 17:37:54 -0500 Message-ID: <50C90690.2000700@redhat.com> Date: Wed, 12 Dec 2012 17:34:56 -0500 From: Rik van Riel User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:15.0) Gecko/20120911 Thunderbird/15.0.1 MIME-Version: 1.0 To: Johannes Weiner CC: Andrew Morton , Michal Hocko , Mel Gorman , Hugh Dickins , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [patch 8/8] mm: reduce rmap overhead for ex-KSM page copies created on swap faults References: <1355348620-9382-1-git-send-email-hannes@cmpxchg.org> <1355348620-9382-9-git-send-email-hannes@cmpxchg.org> In-Reply-To: <1355348620-9382-9-git-send-email-hannes@cmpxchg.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 12/12/2012 04:43 PM, Johannes Weiner wrote: > When ex-KSM pages are faulted from swap cache, the fault handler is > not capable of re-establishing anon_vma-spanning KSM pages. In this > case, a copy of the page is created instead, just like during a COW > break. > > These freshly made copies are known to be exclusive to the faulting > VMA and there is no reason to go look for this page in parent and > sibling processes during rmap operations. > > Use page_add_new_anon_rmap() for these copies. This also puts them on > the proper LRU lists and marks them SwapBacked, so we can get rid of > doing this ad-hoc in the KSM copy code. > > Signed-off-by: Johannes Weiner Reviewed-by: Rik van Riel