mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [Question] sched: migrate RT task on throttled leaf RT runqueue?
@ 2011-07-14 13:43 Hillf Danton
  2011-07-14 14:09 ` Steven Rostedt
  0 siblings, 1 reply; 4+ messages in thread
From: Hillf Danton @ 2011-07-14 13:43 UTC (permalink / raw)
  To: Steven Rostedt; +Cc: LKML

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?

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-07-14 15:22 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-07-14 13:43 [Question] sched: migrate RT task on throttled leaf RT runqueue? Hillf Danton
2011-07-14 14:09 ` Steven Rostedt
2011-07-14 14:58   ` Hillf Danton
2011-07-14 15:22     ` Steven Rostedt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®