From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754625Ab0DOQCL (ORCPT ); Thu, 15 Apr 2010 12:02:11 -0400 Received: from mail-pz0-f204.google.com ([209.85.222.204]:50677 "EHLO mail-pz0-f204.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751248Ab0DOQCJ (ORCPT ); Thu, 15 Apr 2010 12:02:09 -0400 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=iEDBnG6E4SuP16SIbCqui6vNU3p0UDAk5Qo1nkxYcCbHigdbxMngSkQ1TjwhapOQjU i+QbtaaPycdMqhKTqpAzQ0/H3bmlryWHca3PEvZEWiAZzRkrF0+T2HRZkLdFFNvIK2tS Bfq4jlqpfvXyQ1Wx54LLq+oRPmq2MIgw8U8qg= MIME-Version: 1.0 In-Reply-To: <20100414175928.5e1bdce2@annuminas.surriel.com> References: <20100412072056.GA2432@liondog.tnic> <20100412215027.GA6263@liondog.tnic> <20100413093827.GA6954@liondog.tnic> <20100414175928.5e1bdce2@annuminas.surriel.com> Date: Fri, 16 Apr 2010 01:02:08 +0900 Message-ID: Subject: Re: [PATCH] rmap: add exclusively owned pages to the newest anon_vma From: Minchan Kim To: Rik van Riel Cc: Borislav Petkov , Linus Torvalds , Johannes Weiner , KOSAKI Motohiro , Andrew Morton , Linux Kernel Mailing List , Lee Schermerhorn , Nick Piggin , Andrea Arcangeli , Hugh Dickins , sgunderson@bigfoot.com Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Apr 15, 2010 at 6:59 AM, Rik van Riel wrote: > The recent anon_vma fixes cause many anonymous pages to end up > in the parent process anon_vma, even when the page is exclusively > owned by the current process. > > Adding exclusively owned anonymous pages to the top anon_vma > reduces rmap scanning overhead, especially in workloads with > forking servers. > > This patch adds a parameter to __page_set_anon_rmap that can > be used to indicate whether or not the added page is exclusively > owned by the current process. > > Pages added through page_add_new_anon_rmap are exclusively > owned by the current process, and can be added to the top > anon_vma. > > Pages added through page_add_anon_rmap can be either shared > or exclusively owned, so we do the conservative thing and > add it to the oldest anon_vma. > > A next step would be to add the exclusive parameter to > page_add_anon_rmap, to be used from functions where we do > know for sure whether a page is exclusively owned. > > Signed-off-by: Rik van Riel Reviewed-by: Minchan Kim -- Kind regards, Minchan Kim