]> git.openpandora.org Git - pandora-kernel.git/commitdiff
sched: rt-group: deal with PI
authorPeter Zijlstra <a.p.zijlstra@chello.nl>
Wed, 13 Feb 2008 14:45:39 +0000 (15:45 +0100)
committerIngo Molnar <mingo@elte.hu>
Wed, 13 Feb 2008 14:45:39 +0000 (15:45 +0100)
Steven mentioned the fun case where a lock holding task will be throttled.

Simple fix: allow groups that have boosted tasks to run anyway.

If a runnable task in a throttled group gets boosted the dequeue/enqueue
done by rt_mutex_setprio() is enough to unthrottle the group.

This is ofcourse not quite correct. Two possible ways forward are:
  - second prio array for boosted tasks
  - boost to a prio ceiling (this would also work for deadline scheduling)

Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
kernel/sched.c
kernel/sched_rt.c

index 88a17c7128c3b4639a6bf69703a01a5ca4ffd85a..cecaea67ae9b3875f48b8bb1dbeba40a8a9325d1 100644 (file)
@@ -362,6 +362,8 @@ struct rt_rq {
        u64 rt_time;
 
 #ifdef CONFIG_FAIR_GROUP_SCHED
+       unsigned long rt_nr_boosted;
+
        struct rq *rq;
        struct list_head leaf_rt_rq_list;
        struct task_group *tg;
@@ -7112,6 +7114,7 @@ static void init_rt_rq(struct rt_rq *rt_rq, struct rq *rq)
        rt_rq->rt_throttled = 0;
 
 #ifdef CONFIG_FAIR_GROUP_SCHED
+       rt_rq->rt_nr_boosted = 0;
        rt_rq->rq = rq;
 #endif
 }
Simple merge