From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753419Ab2GIMHR (ORCPT ); Mon, 9 Jul 2012 08:07:17 -0400 Received: from merlin.infradead.org ([205.233.59.134]:34716 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753341Ab2GIMHQ convert rfc822-to-8bit (ORCPT ); Mon, 9 Jul 2012 08:07:16 -0400 Message-ID: <1341835552.3462.50.camel@twins> Subject: Re: [RFC][PATCH 14/26] sched, numa: Numa balancer From: Peter Zijlstra To: Rik van Riel Cc: Linus Torvalds , Andrew Morton , Thomas Gleixner , Ingo Molnar , Paul Turner , Suresh Siddha , Mike Galbraith , "Paul E. McKenney" , Lai Jiangshan , Dan Smith , Bharata B Rao , Lee Schermerhorn , Andrea Arcangeli , Johannes Weiner , linux-kernel@vger.kernel.org, linux-mm@kvack.org Date: Mon, 09 Jul 2012 14:05:52 +0200 In-Reply-To: <4FF87F5F.30106@redhat.com> References: <20120316144028.036474157@chello.nl> <20120316144241.012558280@chello.nl> <4FF87F5F.30106@redhat.com> Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7BIT X-Mailer: Evolution 3.2.2- Mime-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, 2012-07-07 at 14:26 -0400, Rik van Riel wrote: > > +/* > > + * Assumes symmetric NUMA -- that is, each node is of equal size. > > + */ > > +static void set_max_mem_load(unsigned long load) > > +{ > > + unsigned long old_load; > > + > > + spin_lock(&max_mem_load.lock); > > + old_load = max_mem_load.load; > > + if (!old_load) > > + old_load = load; > > + max_mem_load.load = (old_load + load) >> 1; > > + spin_unlock(&max_mem_load.lock); > > +} > > The above in your patch kind of conflicts with this bit > from patch 6/26: Yeah,.. its pretty broken. Its also effectively disabled, but yeah. > Looking at how the memory load code is used, I wonder > if it would make sense to count "zone size - free - inactive > file" pages instead? Something like that, although I guess we'd want a sum over all zones in a node for that.