aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/sched/sched.h
diff options
context:
space:
mode:
authorPeter Zijlstra <peterz@infradead.org>2021-01-21 16:09:32 +0100
committerPeter Zijlstra <peterz@infradead.org>2021-04-16 17:06:32 +0200
commitb5c4477366fb5e6a2f0f38742c33acd666c07698 (patch)
treebd7fa4cb0d72be06c611009cd76d94ce85142eeb /kernel/sched/sched.h
parentcpumask: Introduce DYING mask (diff)
downloadlinux-dev-b5c4477366fb5e6a2f0f38742c33acd666c07698.tar.xz
linux-dev-b5c4477366fb5e6a2f0f38742c33acd666c07698.zip
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.h1
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;