Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753557AbbEMGa7 (ORCPT ); Wed, 13 May 2015 02:30:59 -0400 Received: from casper.infradead.org ([85.118.1.10]:41513 "EHLO casper.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751892AbbEMGa5 (ORCPT ); Wed, 13 May 2015 02:30:57 -0400 Date: Wed, 13 May 2015 08:31:06 +0200 From: Peter Zijlstra To: Rik van Riel Cc: dedekind1@gmail.com, linux-kernel@vger.kernel.org, mgorman@suse.de, jhladky@redhat.com Subject: Re: [PATCH] numa,sched: only consider less busy nodes as numa balancing destination Message-ID: <20150513063106.GA1156@worktop.programming.kicks-ass.net> References: <1430908530.7444.145.camel@sauron.fi.intel.com> <20150506114128.0c846a37@cuia.bos.redhat.com> <1431090801.1418.87.camel@sauron.fi.intel.com> <554D1681.7040902@redhat.com> <1431438610.20417.0.camel@sauron.fi.intel.com> <55522005.1080705@redhat.com> <20150513062906.GJ3007@worktop.Skamania.guest> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150513062906.GJ3007@worktop.Skamania.guest> User-Agent: Mutt/1.5.22.1 (2013-10-16) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1444 Lines: 40 On Wed, May 13, 2015 at 08:29:06AM +0200, Peter Zijlstra wrote: > @@ -1572,9 +1582,10 @@ static void numa_migrate_preferred(struct task_struct *p) > * are added when they cause over 6/16 of the maximum number of faults, but > * only removed when they drop below 3/16. > */ > -static void update_numa_active_node_mask(struct numa_group *numa_group) > +static bool update_numa_active_node_mask(struct numa_group *numa_group) > { > unsigned long faults, max_faults = 0; > + bool update = false; > int nid; > > for_each_online_node(nid) { > @@ -1586,11 +1597,17 @@ static void update_numa_active_node_mask(struct numa_group *numa_group) > for_each_online_node(nid) { > faults = group_faults_cpu(numa_group, nid); > if (!node_isset(nid, numa_group->active_nodes)) { > - if (faults > max_faults * 6 / 16) > + if (faults > max_faults * 6 / 16) { > node_set(nid, numa_group->active_nodes); > - } else if (faults < max_faults * 3 / 16) > + update = true; > + } > + } else if (faults < max_faults * 3 / 16) { > node_clear(nid, numa_group->active_nodes); > + update = true; > + } > } > + > + return update; > } > > /* Ignore these hunks, they're dead wood. -- 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/