[Devel] [PATCH 1/2] sched: calculate_imbalance: Fix local->avg_load > sds->avg_load case
Peter Zijlstra
peterz at infradead.org
Mon Sep 16 01:11:32 PDT 2013
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.
More information about the Devel
mailing list