From: Jonathan Schwender <hidden> Date: 2021-02-01 09:35:07
If nohz_full is enabled (more precisely HK_FLAG_TIMER is set), then
do_sched_rt_period_timer may be called on a housekeeping CPU,
which would not service the isolated CPU for a non-root cgroup
(requires a kernel with RT_GROUP_SCHEDULING).
This causes RT tasks in a non-root cgroup to get throttled
indefinitely (unless throttling is disabled) once the timer has
been moved to a housekeeping CPU.
To fix this, housekeeping CPUs now service all online CPUs
if HK_FLAG_TIMER (nohz_full) is set.
I'm not really sure how this relates to Mike Galbraith previous
commit e221d028bb08 ("sched,rt: fix isolated CPUs leaving root_task_group
indefinitely throttled"), (which is dated before the housekeeping changes,)
so I'm posting this as an RFC.
Signed-off-by: Jonathan Schwender <redacted>
---
kernel/sched/rt.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
From: Jonathan Schwender <hidden> Date: 2021-02-02 09:01:19
RFC v2 changes: Fix compile error if CONFIG_SMP is not set, which was
Reported-by: kernel test robot <redacted>
I'm now using smp_processor_id() to get the ID of the CPU the timer
is running on.
If nohz_full is enabled (more precisely HK_FLAG_TIMER is set), then
do_sched_rt_period_timer may be called on a housekeeping CPU,
which would not service the isolated CPU for a non-root cgroup
(requires a kernel with RT_GROUP_SCHEDULING).
This causes RT tasks in a non-root cgroup to get throttled
indefinitely (unless throttling is disabled) once the timer has
been moved to a housekeeping CPU.
To fix this, housekeeping CPUs now service all online CPUs
if HK_FLAG_TIMER (nohz_full) is set.
I'm not really sure how this relates to Mike Galbraith previous
commit e221d028bb08 ("sched,rt: fix isolated CPUs leaving root_task_group
indefinitely throttled"), (which is dated before the housekeeping changes,)
so I'm posting this as an RFC.
Signed-off-by: Jonathan Schwender <redacted>
---
kernel/sched/rt.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: 2021-02-22 14:19:02
On 2021-02-02 10:00:10 [+0100], Jonathan Schwender wrote:
If nohz_full is enabled (more precisely HK_FLAG_TIMER is set), then
do_sched_rt_period_timer may be called on a housekeeping CPU,
which would not service the isolated CPU for a non-root cgroup
(requires a kernel with RT_GROUP_SCHEDULING).
This causes RT tasks in a non-root cgroup to get throttled
indefinitely (unless throttling is disabled) once the timer has
been moved to a housekeeping CPU.
To fix this, housekeeping CPUs now service all online CPUs
if HK_FLAG_TIMER (nohz_full) is set.