[ looks good? if so, I will send a v2 patch set including the ]
[ RT_RUNTIME_GREED patch and this one.                         ]

Currently, the option RT_RUNTIME_SHARE is enabled by default. This
option enables the sharing of rt_runtime between CPUs, allowing a CPU to
borrow rt_runtime from another CPU, permitting a real-time task to run
100% of the time on a single CPU. The problem is that this can lead to
the starvation of a non-real-time task pinned to the CPU running the CPU
bound RT workload. One example of non-real-time task pinned to a CPU are
the kworkers. Often kworkers starve on this scenario, causing a system
hang.

This patch changes the default setup for RT THROTTLING, disabling the
RT_RUNTIME_SHARE option while enabling the RT_RUNTIME_GREED option. In
such configuration, real-time tasks will be able to run 100% of the time
in the absence of non-real-time tasks starving in the local CPU.

Signed-off-by: Daniel Bristot de Oliveira <bris...@redhat.com>
Cc: Ingo Molnar <mi...@redhat.com>
Cc: Peter Zijlstra <pet...@infradead.org>
Cc: Steven Rostedt <rost...@goodmis.org>
Cc: Christoph Lameter <c...@linux.com>
Cc: Tommaso Cucinotta <tommaso.cucino...@sssup.it>
Cc: Luca Abeni <luca.ab...@unitn.it>
Cc: Clark Williams <willi...@redhat.com>
Cc: linux-rt-users <linux-rt-us...@vger.kernel.org>
Cc: LKML <linux-kernel@vger.kernel.org>


diff --git a/kernel/sched/features.h b/kernel/sched/features.h
index 3bd7a6d..265c0db 100644
--- a/kernel/sched/features.h
+++ b/kernel/sched/features.h
@@ -65,8 +65,8 @@ SCHED_FEAT(RT_PUSH_IPI, true)
 #endif

 SCHED_FEAT(FORCE_SD_OVERLAP, false)
-SCHED_FEAT(RT_RUNTIME_SHARE, true)
-SCHED_FEAT(RT_RUNTIME_GREED, false)
+SCHED_FEAT(RT_RUNTIME_SHARE, false)
+SCHED_FEAT(RT_RUNTIME_GREED, true)
 SCHED_FEAT(LB_MIN, false)
 SCHED_FEAT(ATTACH_AGE_LOAD, true)

Reply via email to