lkml.org 
[lkml]   [2010]   [Feb]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subjectsched: Make the rt throtting disabled tunable valid globally
From
Date

On setting /proc/sys/kernel/sched_rt_runtime_us to -1, the intended
behavior is that rt-group throttling is disabled throughout. This
could be confirmed by trying to launch a real time task in a cgroup
which had zero rt runtime allotted to it.

This though was not happening when one tried to move a rt task into
a rt cgroup which had zero rt runtime. Ensure that this
tunable is honoured globally.

Signed-off-by: Dhaval Giani <dhaval.giani@gmail.com>

---
kernel/sched.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

Index: master/kernel/sched.c
===================================================================
--- master.orig/kernel/sched.c
+++ master/kernel/sched.c
@@ -8542,7 +8542,8 @@ static int sched_rt_global_constraints(v
int sched_rt_can_attach(struct task_group *tg, struct task_struct *tsk)
{
/* Don't accept realtime tasks when there is no way for them to run */
- if (rt_task(tsk) && tg->rt_bandwidth.rt_runtime == 0)
+ if (rt_task(tsk) && rt_bandwidth_enabled() &&
+ tg->rt_bandwidth.rt_runtime == 0)
return 0;

return 1;



\
 
 \ /
  Last update: 2010-02-12 17:51    [W:0.044 / U:0.488 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site