Messages in this thread | | | Date | Fri, 23 Aug 2013 13:41:55 +0530 | From | Preeti U Murthy <> | Subject | Re: [PATCH 07/10] sched, fair: Optimize find_busiest_queue() |
| |
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
| |