Skip to content

Commit

Permalink
update_blocked_averages in trigger_loadbalancer every 19ms instead
Browse files Browse the repository at this point in the history
of every tick.
  • Loading branch information
hamadmarri committed Nov 14, 2021
1 parent 4989ab2 commit a178508
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
11 changes: 10 additions & 1 deletion kernel/sched/bs.c
Original file line number Diff line number Diff line change
Expand Up @@ -1058,7 +1058,16 @@ void trigger_load_balance(struct rq *this_rq)
if (unlikely(on_null_domain(this_rq) || !cpu_active(cpu_of(this_rq))))
return;

update_blocked_averages(this_rq->cpu);
#ifdef CONFIG_TT_ACCOUNTING_STATS
if (time_after_eq(jiffies, this_rq->next_balance)) {
/* scale ms to jiffies */
unsigned long interval = msecs_to_jiffies(19);

this_rq->next_balance = jiffies + interval;
update_blocked_averages(this_rq->cpu);
}
#endif

nohz_balancer_kick(this_rq);
}

Expand Down
2 changes: 0 additions & 2 deletions kernel/sched/bs_nohz.h
Original file line number Diff line number Diff line change
Expand Up @@ -686,6 +686,4 @@ static __latent_entropy void run_rebalance_domains(struct softirq_action *h)
*/
if (nohz_idle_balance(this_rq, idle))
return;

update_blocked_averages(this_rq->cpu);
}

0 comments on commit a178508

Please sign in to comment.