sched: Fix hotplug vs CPU bandwidth control
authorPeter Zijlstra <peterz@infradead.org>
Fri, 25 Sep 2020 14:42:31 +0000 (16:42 +0200)
committerPeter Zijlstra <peterz@infradead.org>
Tue, 10 Nov 2020 17:38:59 +0000 (18:38 +0100)
commit120455c514f7321981c907a01c543b05aff3f254
treefbc0bfe58c8e457bea81218250965b0c70abffe7
parent1cf12e08bc4d50a76b80c42a3109c53d8794a0c9
sched: Fix hotplug vs CPU bandwidth control

Since we now migrate tasks away before DYING, we should also move
bandwidth unthrottle, otherwise we can gain tasks from unthrottle
after we expect all tasks to be gone already.

Also; it looks like the RT balancers don't respect cpu_active() and
instead rely on rq->online in part, complete this. This too requires
we do set_rq_offline() earlier to match the cpu_active() semantics.
(The bigger patch is to convert RT to cpu_active() entirely)

Since set_rq_online() is called from sched_cpu_activate(), place
set_rq_offline() in sched_cpu_deactivate().

Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Valentin Schneider <valentin.schneider@arm.com>
Reviewed-by: Daniel Bristot de Oliveira <bristot@redhat.com>
Link: https://lkml.kernel.org/r/20201023102346.639538965@infradead.org
kernel/sched/core.c
kernel/sched/deadline.c
kernel/sched/rt.c