mirror of
https://github.com/torvalds/linux.git
synced 2026-09-27 19:42:03 +02:00
sched/fair: Simplify balance_interval reset logic in sched_balance_rq()
Because active_balance is initialized to 0, and need_active_balance() is a pre-condition for setting it to 1, the condition '!active_balance || need_active_balance()' is a truism and can be removed. Signed-off-by: Xin Zhao <jackzxcui1989@163.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Link: https://patch.msgid.link/20260617072151.1173416-3-jackzxcui1989@163.com
This commit is contained in:
parent
cdd9e37ed4
commit
f2267ad577
|
|
@ -13612,10 +13612,8 @@ static int sched_balance_rq(int this_cpu, struct rq *this_rq,
|
|||
sd->nr_balance_failed = 0;
|
||||
}
|
||||
|
||||
if (likely(!active_balance) || need_active_balance(&env)) {
|
||||
/* We were unbalanced, so reset the balancing interval */
|
||||
sd->balance_interval = sd->min_interval;
|
||||
}
|
||||
/* We were unbalanced, so reset the balancing interval */
|
||||
sd->balance_interval = sd->min_interval;
|
||||
|
||||
goto out;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user