sched/rt: disable RT_RUNTIME_SHARE by default and document it
cover sched/rt: disable RT_RUNTIME_SHARE by default and document it
Disable RT_RUNTIME_SHARE by default and document it.
Daniel Bristot de Oliveira (2):
sched/rt: Disable RT_RUNTIME_SHARE by default sched/rt: Document RT_RUNTIME_SHARE sched feature
kernel/sched/features.h | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-)
Signature · 1 line
2.7.4
PATCH 1/2 sched/rt: Disable RT_RUNTIME_SHARE by default
The RT_RUNTIME_SHARE sched feature enables the sharing of rt_runtime between CPUs, allowing a CPU to run a real-time task up to 100% of the time while leaving more space for non-real-time tasks to run on the CPU that lend rt_runtime.
The problem is that a CPU can easily borrow enough rt_runtime to allow a spinning rt-task to run forever, starving per-cpu tasks like kworkers, which are non-real-time by design.
This patch disables RT_RUNTIME_SHARE by default, avoiding this problem. The feature will still be present for users that want to enable it, though.
kernel/sched/features.h +1 -1
@@ -65,7 +65,7 @@ SCHED_FEAT(RT_PUSH_IPI, true)#endif SCHED_FEAT(FORCE_SD_OVERLAP, false) -SCHED_FEAT(RT_RUNTIME_SHARE, true) +SCHED_FEAT(RT_RUNTIME_SHARE, false) SCHED_FEAT(LB_MIN, false)SCHED_FEAT (ATTACH_AGE_LOAD , true)
Signature · 1 line
2.7.4
PATCH 2/2 sched/rt: Document RT_RUNTIME_SHARE sched feature
In reply to Daniel Bristot de OliveiraAdd a comment explaining the RT_RUNTIME_SHARE sched feature.
kernel/sched/features.h +10 -0
@@ -65,7 +65,17 @@ SCHED_FEAT(RT_PUSH_IPI, true)#endif SCHED_FEAT (FORCE_SD_OVERLAP , false) + +/* +* Enables the sharing of rt_runtime between CPUs, allowing a CPU to +* run a real-time task up to 100% of the time while leaving more +* space for non-real-time tasks to run on the CPU that lend rt_runtime. +* +* WARNING: This may allow the starvation of non-real-time tasks pinned +* to the CPU in which a spinning rt-task runs forever. + */ SCHED_FEAT(RT_RUNTIME_SHARE, false) + SCHED_FEAT(LB_MIN, false)SCHED_FEAT (ATTACH_AGE_LOAD , true)
Signature · 1 line
2.7.4
Quoted 9 lines · Daniel Bristot de Oliveira
Disable
RT_RUNTIME_SHAREby default and document it.Cc Ingo Molnar <[email protected]>Cc Peter Zijlstra <[email protected]>Cc Steven Rostedt <[email protected]>Cc Clark Williams <[email protected]>Cc Luis Claudio R. Goncalves <[email protected]>
Quoted 6 lines
Daniel Bristot de Oliveira (2):
sched/rt: DisableRT_RUNTIME_SHAREby default sched/rt: DocumentRT_RUNTIME_SHAREsched featurekernel/sched/features.h | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-)
In light of the discussion about "sched/rt: RT_RUNTIME_GREED sched feature", disabling RT_RUNTIME_SHARE by default restores a portion of determinism we gave away by using the clever mechanism behind RT_RUNTIME_SHARE. (I should have prefaced that with a IMHO).
Luis
Quoted 9 lines · On Tue, 15 Nov 2016 11:39:09 +0100 Daniel Bristot de Oliveira…
Disable
RT_RUNTIME_SHAREby default and document it.Cc Ingo Molnar <[email protected]>Cc Peter Zijlstra <[email protected]>Cc Steven Rostedt <[email protected]>Cc Clark Williams <[email protected]>Cc Luis Claudio R. Goncalves <[email protected]>
Quoted 7 lines
Daniel Bristot de Oliveira (2):
sched/rt: DisableRT_RUNTIME_SHAREby default sched/rt: DocumentRT_RUNTIME_SHAREsched featurekernel/sched/features.h | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-)
I don't see why this is two patches. A change and a comment can go together, and probably should, especially since the comment explains the change as well.
With a folded patch...
-- Steve
Quoted 5 lines · Steven Rostedt
I don't see why this is two patches. A change and a comment can go together, and probably should, especially since the comment explains the change as well.
With a folded patch...
I will cook a v2 in a single patch!
Thanks!
-- Daniel