Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760204AbZCPLq5 (ORCPT ); Mon, 16 Mar 2009 07:46:57 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1756293AbZCPLqr (ORCPT ); Mon, 16 Mar 2009 07:46:47 -0400 Received: from mx1.suse.de ([195.135.220.2]:45852 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753244AbZCPLqq (ORCPT ); Mon, 16 Mar 2009 07:46:46 -0400 Date: Mon, 16 Mar 2009 12:46:44 +0100 From: Nick Piggin To: Nick Piggin Cc: Mel Gorman , Linux Memory Management List , Pekka Enberg , Rik van Riel , KOSAKI Motohiro , Christoph Lameter , Johannes Weiner , Linux Kernel Mailing List , Lin Ming , Zhang Yanmin , Peter Zijlstra Subject: Re: [PATCH 20/35] Use a pre-calculated value for num_online_nodes() Message-ID: <20090316114644.GC30802@wotan.suse.de> References: <1237196790-7268-1-git-send-email-mel@csn.ul.ie> <1237196790-7268-21-git-send-email-mel@csn.ul.ie> <200903162242.35341.nickpiggin@yahoo.com.au> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200903162242.35341.nickpiggin@yahoo.com.au> User-Agent: Mutt/1.5.9i Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1447 Lines: 34 On Mon, Mar 16, 2009 at 10:42:34PM +1100, Nick Piggin wrote: > On Monday 16 March 2009 20:46:15 Mel Gorman wrote: > > num_online_nodes() is called by the page allocator to decide whether the > > zonelist needs to be filtered based on cpusets or the zonelist cache. > > This is actually a heavy function and touches a number of cache lines. > > This patch stores the number of online nodes at boot time and when > > nodes get onlined and offlined. > > > > Signed-off-by: Mel Gorman > > --- > > include/linux/nodemask.h | 16 ++++++++++++++-- > > mm/page_alloc.c | 6 ++++-- > > 2 files changed, 18 insertions(+), 4 deletions(-) > > > > diff --git a/include/linux/nodemask.h b/include/linux/nodemask.h > > index 848025c..4749e30 100644 > > --- a/include/linux/nodemask.h > > +++ b/include/linux/nodemask.h > > @@ -449,13 +449,25 @@ static inline int num_node_state(enum node_states > > state) node; \ > > }) > > > > +/* Recorded value for num_online_nodes() */ > > +extern int static_num_online_nodes; > > __read_mostly, please. Check this for any other place you've added > global cachelines that are referenced by the allocator. OK I'm blind, sorry ignore that :P -- 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/