Re: [PATCH 3/3] sched: newidle balance set idle_timestamp only onsuccessful pull

From: Mike Galbraith
Date: Tue Feb 08 2011 - 22:37:30 EST


On Tue, 2011-02-08 at 10:13 -0800, Venkatesh Pallipadi wrote:
> load_balance() could return a negative value in the case of
> SMT sibling CPU being busy. Code in idle_balance() though, uses this
> return value as an indicator of successful task pull, ignoring the
> -1 return value.

Yup, garden variety bug.

> This has two problems:
> 1) Resets idle_stamp even when this return value is -1.
> Specific case is on SMT capable system, CPU A is idle and its sibling
> CPU B is busy. In this case, CPU A avg_idle will not depend on
> a task sleeping/waking up on it. Instead it will continue to hold stale
> avg_idle value for extended period of time.

Not good.

Acked-by: Mike Galbraith <efault@xxxxxx>

-Mike

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/