From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from psmtp.com (na3sys010amx163.postini.com [74.125.245.163]) by kanga.kvack.org (Postfix) with SMTP id EBAA46B0034 for ; Tue, 16 Jul 2013 12:02:01 -0400 (EDT) Date: Tue, 16 Jul 2013 17:01:57 +0100 From: Mel Gorman Subject: Re: [PATCH 16/18] sched: Avoid overloading CPUs on a preferred NUMA node Message-ID: <20130716160157.GK5055@suse.de> References: <1373901620-2021-1-git-send-email-mgorman@suse.de> <1373901620-2021-17-git-send-email-mgorman@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: Sender: owner-linux-mm@kvack.org List-ID: To: Hillf Danton Cc: Peter Zijlstra , Srikar Dronamraju , Ingo Molnar , Andrea Arcangeli , Johannes Weiner , Linux-MM , LKML On Tue, Jul 16, 2013 at 11:55:24PM +0800, Hillf Danton wrote: > On Mon, Jul 15, 2013 at 11:20 PM, Mel Gorman wrote: > > + > > +static int task_numa_find_cpu(struct task_struct *p, int nid) > > +{ > > + int node_cpu = cpumask_first(cpumask_of_node(nid)); > [...] > > > > + /* No harm being optimistic */ > > + if (idle_cpu(node_cpu)) > > + return node_cpu; > > > [...] > > + for_each_cpu(cpu, cpumask_of_node(nid)) { > > + dst_load = target_load(cpu, idx); > > + > > + /* If the CPU is idle, use it */ > > + if (!dst_load) > > + return dst_cpu; > > + > Here you want cpu, instead of dst_cpu, I guess. Crap, yes. Thanks! -- Mel Gorman SUSE Labs -- 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: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933469Ab3GPQCE (ORCPT ); Tue, 16 Jul 2013 12:02:04 -0400 Received: from cantor2.suse.de ([195.135.220.15]:41940 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933455Ab3GPQCB (ORCPT ); Tue, 16 Jul 2013 12:02:01 -0400 Date: Tue, 16 Jul 2013 17:01:57 +0100 From: Mel Gorman To: Hillf Danton Cc: Peter Zijlstra , Srikar Dronamraju , Ingo Molnar , Andrea Arcangeli , Johannes Weiner , Linux-MM , LKML Subject: Re: [PATCH 16/18] sched: Avoid overloading CPUs on a preferred NUMA node Message-ID: <20130716160157.GK5055@suse.de> References: <1373901620-2021-1-git-send-email-mgorman@suse.de> <1373901620-2021-17-git-send-email-mgorman@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jul 16, 2013 at 11:55:24PM +0800, Hillf Danton wrote: > On Mon, Jul 15, 2013 at 11:20 PM, Mel Gorman wrote: > > + > > +static int task_numa_find_cpu(struct task_struct *p, int nid) > > +{ > > + int node_cpu = cpumask_first(cpumask_of_node(nid)); > [...] > > > > + /* No harm being optimistic */ > > + if (idle_cpu(node_cpu)) > > + return node_cpu; > > > [...] > > + for_each_cpu(cpu, cpumask_of_node(nid)) { > > + dst_load = target_load(cpu, idx); > > + > > + /* If the CPU is idle, use it */ > > + if (!dst_load) > > + return dst_cpu; > > + > Here you want cpu, instead of dst_cpu, I guess. Crap, yes. Thanks! -- Mel Gorman SUSE Labs