Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757428Ab0DOIem (ORCPT ); Thu, 15 Apr 2010 04:34:42 -0400 Received: from mail.skyhub.de ([78.46.96.112]:55064 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757347Ab0DOIek (ORCPT ); Thu, 15 Apr 2010 04:34:40 -0400 Date: Thu, 15 Apr 2010 10:34:24 +0200 From: Borislav Petkov To: Rik van Riel Cc: Linus Torvalds , Johannes Weiner , KOSAKI Motohiro , Andrew Morton , Minchan Kim , Linux Kernel Mailing List , Lee Schermerhorn , Nick Piggin , Andrea Arcangeli , Hugh Dickins , sgunderson@bigfoot.com Subject: Re: [PATCH] rmap: add exclusively owned pages to the newest anon_vma Message-ID: <20100415083424.GA3565@liondog.tnic> Mail-Followup-To: Borislav Petkov , Rik van Riel , Linus Torvalds , Johannes Weiner , KOSAKI Motohiro , Andrew Morton , Minchan Kim , Linux Kernel Mailing List , Lee Schermerhorn , Nick Piggin , Andrea Arcangeli , Hugh Dickins , sgunderson@bigfoot.com References: <20100411185508.GA4450@liondog.tnic> <20100412072056.GA2432@liondog.tnic> <20100412215027.GA6263@liondog.tnic> <20100413093827.GA6954@liondog.tnic> <20100414175928.5e1bdce2@annuminas.surriel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20100414175928.5e1bdce2@annuminas.surriel.com> User-Agent: Mutt/1.5.20 (2009-06-14) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1626 Lines: 45 From: Rik van Riel Date: Wed, Apr 14, 2010 at 05:59:28PM -0400 > 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 > --- > Borislav, I audited the code before making this change, but would > still appreciate your testing of this patch :) Just did some light hammering and it looks ok so far. I'll keep watching out for oopsies/issues. Lightly-tested-by: Borislav Petkov -- Regards/Gruss, Boris. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/