[PATCH] sched/rt: Change default setup for RT THROTTLING

From: Daniel Bristot de Oliveira
Date: Tue Nov 08 2016 - 04:22:19 EST


[ 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 <bristot@xxxxxxxxxx>
Cc: Ingo Molnar <mingo@xxxxxxxxxx>
Cc: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
Cc: Steven Rostedt <rostedt@xxxxxxxxxxx>
Cc: Christoph Lameter <cl@xxxxxxxxx>
Cc: Tommaso Cucinotta <tommaso.cucinotta@xxxxxxxx>
Cc: Luca Abeni <luca.abeni@xxxxxxxx>
Cc: Clark Williams <williams@xxxxxxxxxx>
Cc: linux-rt-users <linux-rt-users@xxxxxxxxxxxxxxx>
Cc: LKML <linux-kernel@xxxxxxxxxxxxxxx>


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)