aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/sched.c
diff options
context:
space:
mode:
authorPeter Zijlstra <peterz@infradead.org>2009-01-14 04:56:32 -0500
committerIngo Molnar <mingo@elte.hu>2009-01-15 09:07:27 -0500
commit98a4826b99bc4bcc34c604b2fc4fcf4d771600ec (patch)
treefef4d0c48a91ce241555d4813b7f52beaf8b274c /kernel/sched.c
parent01e3eb82278bf45221fc38b391bc5ee0f6a314d6 (diff)
sched: fix bandwidth validation for UID grouping
Impact: make rt-limit tunables work again Mark Glines reported: > I've got an issue on x86-64 where I can't configure the system to allow > RT tasks for a non-root user. > > In 2.6.26.5, I was able to do the following to set things up nicely: > echo 450000 >/sys/kernel/uids/0/cpu_rt_runtime > echo 450000 >/sys/kernel/uids/1000/cpu_rt_runtime > > Seems like every value I try to echo into the /sys files returns EINVAL. For UID grouping we initialize the root group with infinite bandwidth which by default is actually more than the global limit, therefore the bandwidth check always fails. Because the root group is a phantom group (for UID grouping) we cannot runtime adjust it, therefore we let it reflect the global bandwidth settings. Reported-by: Mark Glines <mark@glines.org> Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/sched.c')
-rw-r--r--kernel/sched.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/kernel/sched.c b/kernel/sched.c
index 3b630d882660..ed62d1cee05c 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -9050,6 +9050,13 @@ static int tg_schedulable(struct task_group *tg, void *data)
9050 runtime = d->rt_runtime; 9050 runtime = d->rt_runtime;
9051 } 9051 }
9052 9052
9053#ifdef CONFIG_USER_SCHED
9054 if (tg == &root_task_group) {
9055 period = global_rt_period();
9056 runtime = global_rt_runtime();
9057 }
9058#endif
9059
9053 /* 9060 /*
9054 * Cannot have more runtime than the period. 9061 * Cannot have more runtime than the period.
9055 */ 9062 */