lkml.org 
[lkml]   [2014]   [Jun]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] sched: Fast idling of CPU when system is partially loaded
From
Date
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



\
 
 \ /
  Last update: 2014-06-13 23:21    [W:0.057 / U:3.228 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site