[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20060908103529.A9121@unix-os.sc.intel.com>
Date: Fri, 8 Sep 2006 10:35:29 -0700
From: "Siddha, Suresh B" <suresh.b.siddha@...el.com>
To: Christoph Lameter <clameter@....com>
Cc: akpm@...l.org, linux-kernel@...r.kernel.org, npiggin@...e.de,
mingo@...e.hu
Subject: Re: [PATCH] Fix longstanding load balancing bug in the scheduler.
On Wed, Sep 06, 2006 at 04:38:33PM -0700, Christoph Lameter wrote:
> +int cpu_of(struct rq *rq)
> +{
> +#ifdef CONFIG_SMP
> + return rq->cpu;
> +#else
> + return 0;
> +#endif
> +}
Is there a reason why this is not made inline?
> static struct sched_group *
> find_busiest_group(struct sched_domain *sd, int this_cpu,
> - unsigned long *imbalance, enum idle_type idle, int
> *sd_idle)
> + unsigned long *imbalance, enum idle_type idle, int
> *sd_idle,
> + cpumask_t *cpus)
> {
> struct sched_group *busiest = NULL, *this = NULL, *group =
> sd->groups;
> unsigned long max_load, avg_load, total_load, this_load,
> total_pwr;
> @@ -2243,7 +2254,12 @@
> sum_weighted_load = sum_nr_running = avg_load = 0;
>
> for_each_cpu_mask(i, group->cpumask) {
> - struct rq *rq = cpu_rq(i);
> + struct rq *rq;
> +
> + if (!cpu_isset(i, *cpus))
> + continue;
In normal conditions can we make this "cpus" argument NULL and only set/use it
when we run into pinned condition? That will atleast avoid unnecessary memory
test bit operations in the normal case.
thanks,
suresh
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists