[RFC] sched: no preempt by RT task of throttled task group

From: Hillf Danton
Date: Wed Jul 27 2011 - 09:24:14 EST


If the newly woken task is member of a throttled task group, the current task
should not be preempted, since the woken task is not eligible for schedule.

Would you please, Paul, give ideas on defining throttled task group, say

task_group_throttled(task_group(task))

for a given RT task, since it is too hard to understand the teaching that
runqueue is never throttled but task group could.

Thanks,
Hillf
---
kernel/sched_rt.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/kernel/sched_rt.c b/kernel/sched_rt.c
index 97540f0..c6762eb 100644
--- a/kernel/sched_rt.c
+++ b/kernel/sched_rt.c
@@ -1090,6 +1090,8 @@ static void check_preempt_equal_prio(struct rq
*rq, struct task_struct *p)
*/
static void check_preempt_curr_rt(struct rq *rq, struct task_struct
*p, int flags)
{
+ if (rt_rq_throttled(rt_rq_of_se(&p->rt)))
+ return;
if (p->prio < rq->curr->prio) {
resched_task(rq->curr);
return;
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/