Skip to content

Commit

Permalink
Add missing load update in couple functions: trigger_loadbalancer
Browse files Browse the repository at this point in the history
and task_dead.
  • Loading branch information
hamadmarri committed Nov 13, 2021
1 parent 970fef0 commit b1e1202
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions kernel/sched/bs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down
4 changes: 4 additions & 0 deletions kernel/sched/bs.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down

0 comments on commit b1e1202

Please sign in to comment.