lkml.org 
[lkml]   [2011]   [Jul]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
Subject[Question] sched: migrate RT task on throttled leaf RT runqueue?
From
Hi Steven

When a non-boosted RT task is enqueued, if it is attached to task group, as
shown in the following diff format for clarity, and even if the RT runqueue
owned by the task group is throttled, the rt_rq is loaded up as leaf and the
task is added to pushable list if it is pushable.

Since RT tasks on throttled rt_runqueue will not be picked to be the next task
when scheduling, could they be migrated by pushing and pulling?

Thanks,

Hillf
---
kernel/sched_rt.c | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/kernel/sched_rt.c b/kernel/sched_rt.c
index 97540f0..8489953 100644
--- a/kernel/sched_rt.c
+++ b/kernel/sched_rt.c
@@ -882,6 +882,9 @@ static void __enqueue_rt_entity(struct
sched_rt_entity *rt_se, bool head)
if (group_rq && (rt_rq_throttled(group_rq) || !group_rq->rt_nr_running))
return;

+ /* if (rt_rq_throttled(rt_rq) && !rt_se_boosted(rt_se))
+ return; */
+
if (!rt_rq->rt_nr_running)
list_add_leaf_rt_rq(rt_rq);

@@ -1418,6 +1421,9 @@ retry:
return 0;
}

+ if (rt_rq_throttled(rt_rq_of_se(&next_task->rt)))
+ return 0;
+
/* We might release rq lock */
get_task_struct(next_task);

@@ -1519,6 +1525,9 @@ static int pull_rt_task(struct rq *this_rq)

p = pick_next_highest_task_rt(src_rq, this_cpu);

+ if (p && rt_rq_throttled(rt_rq_of_se(&p->rt)))
+ goto skip;
+
/*
* Do we have an RT task that preempts
* the to-be-scheduled task?

\
 
 \ /
  Last update: 2011-07-14 15:47    [from the cache]
©2003-2011 Jasper Spaans