From b1e1202c3b462d63ee18ecdda88d62b5ae1cd7a7 Mon Sep 17 00:00:00 2001 From: Hamad Al Marri Date: Sun, 14 Nov 2021 01:06:33 +0300 Subject: [PATCH] Add missing load update in couple functions: trigger_loadbalancer and task_dead. --- kernel/sched/bs.c | 1 + kernel/sched/bs.h | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/kernel/sched/bs.c b/kernel/sched/bs.c index 2813bf71cb246..f61c883b51734 100644 --- a/kernel/sched/bs.c +++ b/kernel/sched/bs.c @@ -1012,6 +1012,7 @@ 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); nohz_balancer_kick(this_rq); } diff --git a/kernel/sched/bs.h b/kernel/sched/bs.h index 80f813826406d..d413aad1d0a37 100644 --- a/kernel/sched/bs.h +++ b/kernel/sched/bs.h @@ -58,12 +58,16 @@ static void rq_online_fair(struct rq *rq) {} static void rq_offline_fair(struct rq *rq) {} static void task_dead_fair(struct task_struct *p) { +#ifdef CONFIG_TT_ACCOUNTING_STATS + remove_entity_load_avg(&p->se); +#else struct cfs_rq *cfs_rq = cfs_rq_of(&p->se); unsigned long flags; raw_spin_lock_irqsave(&cfs_rq->removed.lock, flags); ++cfs_rq->removed.nr; raw_spin_unlock_irqrestore(&cfs_rq->removed.lock, flags); +#endif } #endif /** CONFIG_SMP */