diff --git a/kernel/sched/bs.c b/kernel/sched/bs.c index 0b289f655e65..758cd410d6e6 100644 --- a/kernel/sched/bs.c +++ b/kernel/sched/bs.c @@ -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); } diff --git a/kernel/sched/bs_nohz.h b/kernel/sched/bs_nohz.h index 3802951591f3..89466954743c 100644 --- a/kernel/sched/bs_nohz.h +++ b/kernel/sched/bs_nohz.h @@ -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); }