lkml.org 
[lkml]   [2013]   [Aug]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] sched: Give idle_balance() a break when it does not move tasks.
>  	/*
> @@ -5298,6 +5300,8 @@ void idle_balance(int this_cpu, struct rq *this_rq)
> continue;
>
> if (sd->flags & SD_BALANCE_NEWIDLE) {
> + load_balance_attempted = true;
> +
> /* If we've pulled tasks over stop searching: */
> pulled_task = load_balance(this_cpu, this_rq,
> sd, CPU_NEWLY_IDLE, &balance);
> @@ -5322,6 +5326,10 @@ void idle_balance(int this_cpu, struct rq *this_rq)
> */
> this_rq->next_balance = next_balance;
> }
> +
> + /* Give idle balance on this CPU a break when it isn't moving tasks */
> + if (load_balance_attempted && !pulled_task)
> + this_rq->next_newidle_balance = jiffies + (HZ / 100);
> }

Looks reasonable. However should we do this per sd and not per rq. i.e
move the next_newidle_balance to sched_domain. So if we find a
load_balance in newly_idle context that wasn't successful, we skip
load_balance for that sd in the next newly idle balance.

--
Thanks and Regards
Srikar Dronamraju



\
 
 \ /
  Last update: 2013-08-12 13:21    [W:0.044 / U:0.160 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site