Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755222Ab3HWIOp (ORCPT ); Fri, 23 Aug 2013 04:14:45 -0400 Received: from e23smtp05.au.ibm.com ([202.81.31.147]:60741 "EHLO e23smtp05.au.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754652Ab3HWIOn (ORCPT ); Fri, 23 Aug 2013 04:14:43 -0400 Message-ID: <5217194B.2020209@linux.vnet.ibm.com> Date: Fri, 23 Aug 2013 13:41:55 +0530 From: Preeti U Murthy User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:14.0) Gecko/20120717 Thunderbird/14.0 MIME-Version: 1.0 To: Peter Zijlstra CC: Ingo Molnar , Joonsoo Kim , linux-kernel@vger.kernel.org, Mike Galbraith , Paul Turner , Alex Shi , Vincent Guittot , Morten Rasmussen , Namhyung Kim , Lei Wen , Rik van Riel , Joonsoo Kim Subject: Re: [PATCH 07/10] sched, fair: Optimize find_busiest_queue() References: <20130819160058.539049611@infradead.org> <20130819160425.527872672@infradead.org> In-Reply-To: <20130819160425.527872672@infradead.org> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-TM-AS-MML: No x-cbid: 13082308-1396-0000-0000-000003720FA9 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1384 Lines: 51 Hi Peter, On 08/19/2013 09:31 PM, Peter Zijlstra wrote: In the load balancing code, looks to me that cpumask_copy(cpus, cpu_active_mask) is not updating the env.cpus at all, before calling find_busiest_group(). Am I missing something? Should not cpumask_copy() below be before we update the env.cpus parameter? static int load_balance(int this_cpu, struct rq *this_rq, struct sched_domain *sd, enum cpu_idle_type idle, int *balance) { int ld_moved, cur_ld_moved, active_balance = 0; struct sched_group *group; struct rq *busiest; unsigned long flags; struct cpumask *cpus = __get_cpu_var(load_balance_mask); struct lb_env env = { .sd = sd, .dst_cpu = this_cpu, .dst_rq = this_rq, .dst_grpmask = sched_group_cpus(sd->groups), .idle = idle, .loop_break = sched_nr_migrate_break, .cpus = cpus, }; /* * For NEWLY_IDLE load_balancing, we don't need to consider * other cpus in our group */ if (idle == CPU_NEWLY_IDLE) env.dst_grpmask = NULL; cpumask_copy(cpus, cpu_active_mask); schedstat_inc(sd, lb_count[idle]); redo: group = find_busiest_group(&env, balance); Regards Preeti U Murthy -- 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/