Re: [PATCH] sched: Fast idling of CPU when system is partially loaded

From: Tim Chen
Date: Fri Jun 13 2014 - 16:17:18 EST


On Fri, 2014-06-13 at 12:18 -0700, Jason Low wrote:

>
> I see. In that case, if a CPU is going idle, it still needs to call
> idle_balance() to update rq->idle_stamp and rq->next_balance (even if we
> skip calling the expensive load_balance).
>
> What do you think about moving the overload check to the top of
> idle_balance():
>
> this_rq->idle_stamp = rq_clock(this_rq);
>
> - if (this_rq->avg_idle < sysctl_sched_migration_cost) {
> + if (this_rq->avg_idle < sysctl_sched_migration_cost ||
> + !this_rq->rd->overload) {
> rcu_read_lock();
> sd = rcu_dereference_check_sched_domain(this_rq->sd);
> if (sd)
>
>

That's a good point. I think moving the check as you suggested
is appropriate. I'll update the code in my next version.

Tim

--
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/