diff options
author | Peter Zijlstra <peterz@infradead.org> | 2021-01-21 18:09:32 +0300 |
---|---|---|
committer | Peter Zijlstra <peterz@infradead.org> | 2021-04-16 18:06:32 +0300 |
commit | b5c4477366fb5e6a2f0f38742c33acd666c07698 (patch) | |
tree | bd7fa4cb0d72be06c611009cd76d94ce85142eeb /kernel/sched/sched.h | |
parent | e40f74c535b8a0ecf3ef0388b51a34cdadb34fb5 (diff) | |
download | linux-b5c4477366fb5e6a2f0f38742c33acd666c07698.tar.xz |
sched: Use cpu_dying() to fix balance_push vs hotplug-rollback
Use the new cpu_dying() state to simplify and fix the balance_push()
vs CPU hotplug rollback state.
Specifically, we currently rely on notifiers sched_cpu_dying() /
sched_cpu_activate() to terminate balance_push, however if the
cpu_down() fails when we're past sched_cpu_deactivate(), it should
terminate balance_push at that point and not wait until we hit
sched_cpu_activate().
Similarly, when cpu_up() fails and we're going back down, balance_push
should be active, where it currently is not.
So instead, make sure balance_push is enabled below SCHED_AP_ACTIVE
(when !cpu_active()), and gate it's utility with cpu_dying().
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Valentin Schneider <valentin.schneider@arm.com>
Link: https://lkml.kernel.org/r/YHgAYef83VQhKdC2@hirez.programming.kicks-ass.net
Diffstat (limited to 'kernel/sched/sched.h')
-rw-r--r-- | kernel/sched/sched.h | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h index cbb0b011e9e0..7e7e936b4938 100644 --- a/kernel/sched/sched.h +++ b/kernel/sched/sched.h @@ -983,7 +983,6 @@ struct rq { unsigned long cpu_capacity_orig; struct callback_head *balance_callback; - unsigned char balance_push; unsigned char nohz_idle_balance; unsigned char idle_balance; |