On 11/16/2016 02:10 PM, Vincent Guittot wrote:
On 16 November 2016 at 13:08, Dietmar Eggemann dietmar.eggemann@arm.com wrote:
[...]
@@ -7585,8 +7598,9 @@ static int idle_balance(struct rq *this_rq) */ this_rq->idle_stamp = rq_clock(this_rq);
if (this_rq->avg_idle < sysctl_sched_migration_cost ||
!this_rq->rd->overload) {
if (!test_bit(NOHZ_STATS_KICK, nohz_flags(this_cpu)) &&
(this_rq->avg_idle < sysctl_sched_migration_cost ||
!this_rq->rd->overload)) {
In case 'NOHZ_STATS_KICK' is set you want to call the update_blocked_averages(this_cpu) below but do you also want to do the actual idle load balancing?
In fact, we don't because the move of tasks is skipped in load_balance (see above). I remember that i wanted update_group_capacity to be called periodically through find_busiest_group but it seems to be quite heavy just for calling this function . I have to refresh my mind but It was may be linked to other stuff that as disappear in the mean time.
OK, now I understand. There is this NOHZ_STATS_KICK related bail-out condition after the find_busiest_group() call in load_balance() which I couldn't make any sense of by myself.
[...]
@@ -8043,6 +8070,11 @@ static void nohz_idle_balance(struct rq *this_rq, enum cpu_idle_type idle) * do the balance. */ if (time_after_eq(jiffies, rq->next_balance)) {
/* only stats update is required */
if (update_stats_only)
set_bit(NOHZ_STATS_KICK, nohz_flags(balance_cpu));
Why don't you call update_blocked_averages(balance_cpu) here in skip the rebalance_domains() call in case of update_stats_only = 1 (i.e. in case NOHZ_STATS_KICK was set on this_cpu. I assume here that when NOHZ_STATS_KICK is set we really only want to do the update and no actual load balancing.
As explained above, i wanted update_group_capacity to be also called periodically and may be other part of load_balance
Got it.
[...]