From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756076AbZDVUcg (ORCPT ); Wed, 22 Apr 2009 16:32:36 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753959AbZDVUcZ (ORCPT ); Wed, 22 Apr 2009 16:32:25 -0400 Received: from g1t0026.austin.hp.com ([15.216.28.33]:42250 "EHLO g1t0026.austin.hp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753084AbZDVUcZ (ORCPT ); Wed, 22 Apr 2009 16:32:25 -0400 Subject: Re: [PATCH 16/22] Do not setup zonelist cache when there is only one node From: Lee Schermerhorn To: David Rientjes Cc: Mel Gorman , Linux Memory Management List , KOSAKI Motohiro , Christoph Lameter , Nick Piggin , Linux Kernel Mailing List , Lin Ming , Zhang Yanmin , Peter Zijlstra , Pekka Enberg , Andrew Morton In-Reply-To: References: <1240408407-21848-1-git-send-email-mel@csn.ul.ie> <1240408407-21848-17-git-send-email-mel@csn.ul.ie> Content-Type: text/plain Organization: HP/OSLO Date: Wed, 22 Apr 2009 16:32:19 -0400 Message-Id: <1240432339.22694.64.camel@lts-notebook> Mime-Version: 1.0 X-Mailer: Evolution 2.22.3.1 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 2009-04-22 at 13:24 -0700, David Rientjes wrote: > On Wed, 22 Apr 2009, Mel Gorman wrote: > > > There is a zonelist cache which is used to track zones that are not in > > the allowed cpuset or found to be recently full. This is to reduce cache > > footprint on large machines. On smaller machines, it just incurs cost > > for no gain. This patch only uses the zonelist cache when there are NUMA > > nodes. > > > > Signed-off-by: Mel Gorman > > Reviewed-by: Christoph Lameter > > --- > > mm/page_alloc.c | 7 +++++-- > > 1 files changed, 5 insertions(+), 2 deletions(-) > > > > diff --git a/mm/page_alloc.c b/mm/page_alloc.c > > index 7f45de1..e59bb80 100644 > > --- a/mm/page_alloc.c > > +++ b/mm/page_alloc.c > > @@ -1467,8 +1467,11 @@ this_zone_full: > > if (NUMA_BUILD) > > zlc_mark_zone_full(zonelist, z); > > If zonelist caching is never used for UMA machines, why should they ever > call zlc_mark_zone_full()? It will always dereference > zonelist->zlcache_ptr and immediately return without doing anything. > > Wouldn't it better to just add > > if (num_online_nodes() == 1) > continue; > > right before this call to zlc_mark_zone_full()? This should compile out > the remainder of the loop for !CONFIG_NUMA kernels anyway. Shouldn't it already do that? NUMA_BUILD is defined as 0 when !CONFIG_NUMA to avoid #ifdef's in the code while still allowing compiler error checking in the dead code. Lee > > > try_next_zone: > > - if (NUMA_BUILD && !did_zlc_setup) { > > - /* we do zlc_setup after the first zone is tried */ > > + if (NUMA_BUILD && !did_zlc_setup && num_online_nodes() > 1) { > > + /* > > + * we do zlc_setup after the first zone is tried but only > > + * if there are multiple nodes make it worthwhile > > + */ > > allowednodes = zlc_setup(zonelist, alloc_flags); > > zlc_active = 1; > > did_zlc_setup = 1; > > -- > > 1.5.6.5 > > -- > 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 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail143.messagelabs.com (mail143.messagelabs.com [216.82.254.35]) by kanga.kvack.org (Postfix) with ESMTP id 9CD826B0047 for ; Wed, 22 Apr 2009 16:31:55 -0400 (EDT) Subject: Re: [PATCH 16/22] Do not setup zonelist cache when there is only one node From: Lee Schermerhorn In-Reply-To: References: <1240408407-21848-1-git-send-email-mel@csn.ul.ie> <1240408407-21848-17-git-send-email-mel@csn.ul.ie> Content-Type: text/plain Date: Wed, 22 Apr 2009 16:32:19 -0400 Message-Id: <1240432339.22694.64.camel@lts-notebook> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: owner-linux-mm@kvack.org To: David Rientjes Cc: Mel Gorman , Linux Memory Management List , KOSAKI Motohiro , Christoph Lameter , Nick Piggin , Linux Kernel Mailing List , Lin Ming , Zhang Yanmin , Peter Zijlstra , Pekka Enberg , Andrew Morton List-ID: On Wed, 2009-04-22 at 13:24 -0700, David Rientjes wrote: > On Wed, 22 Apr 2009, Mel Gorman wrote: > > > There is a zonelist cache which is used to track zones that are not in > > the allowed cpuset or found to be recently full. This is to reduce cache > > footprint on large machines. On smaller machines, it just incurs cost > > for no gain. This patch only uses the zonelist cache when there are NUMA > > nodes. > > > > Signed-off-by: Mel Gorman > > Reviewed-by: Christoph Lameter > > --- > > mm/page_alloc.c | 7 +++++-- > > 1 files changed, 5 insertions(+), 2 deletions(-) > > > > diff --git a/mm/page_alloc.c b/mm/page_alloc.c > > index 7f45de1..e59bb80 100644 > > --- a/mm/page_alloc.c > > +++ b/mm/page_alloc.c > > @@ -1467,8 +1467,11 @@ this_zone_full: > > if (NUMA_BUILD) > > zlc_mark_zone_full(zonelist, z); > > If zonelist caching is never used for UMA machines, why should they ever > call zlc_mark_zone_full()? It will always dereference > zonelist->zlcache_ptr and immediately return without doing anything. > > Wouldn't it better to just add > > if (num_online_nodes() == 1) > continue; > > right before this call to zlc_mark_zone_full()? This should compile out > the remainder of the loop for !CONFIG_NUMA kernels anyway. Shouldn't it already do that? NUMA_BUILD is defined as 0 when !CONFIG_NUMA to avoid #ifdef's in the code while still allowing compiler error checking in the dead code. Lee > > > try_next_zone: > > - if (NUMA_BUILD && !did_zlc_setup) { > > - /* we do zlc_setup after the first zone is tried */ > > + if (NUMA_BUILD && !did_zlc_setup && num_online_nodes() > 1) { > > + /* > > + * we do zlc_setup after the first zone is tried but only > > + * if there are multiple nodes make it worthwhile > > + */ > > allowednodes = zlc_setup(zonelist, alloc_flags); > > zlc_active = 1; > > did_zlc_setup = 1; > > -- > > 1.5.6.5 > > -- > 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 -- 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