On 1 February 2018 at 19:10, Peter Zijlstra <pet...@infradead.org> wrote:
> On Wed, Jan 24, 2018 at 09:25:36AM +0100, Vincent Guittot wrote:
>> @@ -8861,7 +8875,14 @@ static int idle_balance(struct rq *this_rq, struct 
>> rq_flags *rf)
>>                       update_next_balance(sd, &next_balance);
>>               rcu_read_unlock();
>>
>> -             if (time_after(jiffies, next) && 
>> atomic_read(&nohz.stats_state))
>> +             /*
>> +              * Update blocked idle load if it has not been done for a
>> +              * while. Try to do it locally before entering idle but kick a
>> +              * ilb if it takes too much time and might delay next local
>> +              * wake up
>> +              */
>> +             if (time_after(jiffies, next) && 
>> atomic_read(&nohz.stats_state) &&
>> +                             !_nohz_idle_balance(this_rq, NOHZ_STATS_KICK, 
>> CPU_NEWLY_IDLE))
>>                       kick_ilb(NOHZ_STATS_KICK);
>>
>>               goto out;
>
> This I really dislike. We're here because avg_idle is _really_ low, we
> really should not then call _nohz_idle_balance().

Yes. In fact I was targeting the case were (this_rq->avg_idle >=
sysctl_sched_migration_cost) and the system is not overloaded

Reply via email to