public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] sched: unthrottle rt_rq in migrate_tasks()
@ 2012-05-18 18:56 Peter Boonstoppel
  2012-05-25 14:49 ` Peter Zijlstra
  0 siblings, 1 reply; 3+ messages in thread
From: Peter Boonstoppel @ 2012-05-18 18:56 UTC (permalink / raw)
  To: a.p.zijlstra@chello.nl, mingo@kernel.org, pjt@google.com,
	tglx@linutronix.de, seto.hidetoshi@jp.fujitsu.com,
	linux-kernel@vger.kernel.org
  Cc: Peter De Schrijver

migrate_tasks() uses _pick_next_task_rt() to get tasks from the
real-time runqueue to be migrated. When rt_rq is throttled
_pick_next_task_rt() won't return anything, in which case
migrate_tasks() can't move all threads over and gets stuck in an
infinite loop.

Instead unthrottle rt_rq before migrating tasks.

Signed-off-by: Peter Boonstoppel <pboonstoppel@nvidia.com>
---
 kernel/sched/core.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index 9236a48..b37e0b3 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -5159,6 +5159,12 @@ static void migrate_tasks(unsigned int dead_cpu)
 	/* Ensure any throttled groups are reachable by pick_next_task */
 	unthrottle_offline_cfs_rqs(rq);
 
+	/*
+	 * Ensure rt_rq is not throttled so its threads can be migrated using
+	 * pick_next_task_rt
+	 */
+	rq->rt.rt_throttled = 0;
+
 	for ( ; ; ) {
 		/*
 		 * There's this thread running, bail when that's the only
-- 
1.7.4.1

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

end of thread, other threads:[~2012-06-22 17:49 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-18 18:56 [PATCH] sched: unthrottle rt_rq in migrate_tasks() Peter Boonstoppel
2012-05-25 14:49 ` Peter Zijlstra
2012-06-22 17:49   ` [PATCH 1/1] sched: unthrottle rt runqueues in __disable_runtime() Peter Boonstoppel

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