[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20130916081132.GP21832@twins.programming.kicks-ass.net>
Date: Mon, 16 Sep 2013 10:11:32 +0200
From: Peter Zijlstra <peterz@...radead.org>
To: Vladimir Davydov <vdavydov@...allels.com>
Cc: Ingo Molnar <mingo@...nel.org>, Paul Turner <pjt@...gle.com>,
linux-kernel@...r.kernel.org, devel@...nvz.org
Subject: Re: [PATCH 1/2] sched: calculate_imbalance: Fix local->avg_load >
sds->avg_load case
On Mon, Sep 16, 2013 at 12:06:08PM +0400, Vladimir Davydov wrote:
> On 09/16/2013 09:52 AM, Peter Zijlstra wrote:
> >On Sun, Sep 15, 2013 at 05:49:13PM +0400, Vladimir Davydov wrote:
> >>- if (busiest->avg_load < sds->avg_load) {
> >>+ if (busiest->avg_load <= sds->avg_load ||
> >>+ local->avg_load >= sds->avg_load) {
> >> env->imbalance = 0;
> >> return fix_small_imbalance(env, sds);
> >> }
> >Why the = part? Surely 'busiest->avg_load < sds->avg_load ||
> >local->avg_load > sds->avg_load' avoids both underflows?
>
> Of course it does, but env->imbalance will be assigned to 0 anyway in =
> case, so why not go shortcut?
D'uh right.. hadn't had my morning juice yet.
--
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