mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] sched: avoid overpull when pulling RT task
@ 2011-05-15  4:35 Hillf Danton
  2011-05-15  6:35 ` Mike Galbraith
  0 siblings, 1 reply; 8+ messages in thread
From: Hillf Danton @ 2011-05-15  4:35 UTC (permalink / raw)
  To: LKML; +Cc: Ingo Molnar, Peter Zijlstra, Mike Galbraith, Yong Zhang

When pulling RT task for a given runqueue, pulling is continued even
after certain RT tasks get pulled, in case there are still higher
priority tasks on other runqueues, though it is low likelihood as the
comment says. The load of of this runqueue, on other hand, should also
be concerned. If it is overloaded, the low likelihood should be
abandoned to avoid overpull.

Signed-off-by: Hillf Danton <dhillf@gmail.com>
---
 kernel/sched_rt.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/kernel/sched_rt.c b/kernel/sched_rt.c
index 14c764b..b425ca1 100644
--- a/kernel/sched_rt.c
+++ b/kernel/sched_rt.c
@@ -1508,6 +1508,11 @@ static int pull_rt_task(struct rq *this_rq)
 		}
 skip:
 		double_unlock_balance(this_rq, src_rq);
+
+		/* if pulled we have to also avoid overpull */
+		if (ret == 1)
+			if (likely(rt_overloaded(this_rq)))
+				break;
 	}

 	return ret;

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

end of thread, other threads:[~2011-05-18  1:21 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-15  4:35 [PATCH] sched: avoid overpull when pulling RT task Hillf Danton
2011-05-15  6:35 ` Mike Galbraith
2011-05-15 11:18   ` Hillf Danton
2011-05-16 13:14   ` Hillf Danton
2011-05-16 14:11     ` Mike Galbraith
2011-05-17 14:25       ` Hillf Danton
2011-05-17 18:50         ` Mike Galbraith
2011-05-18  1:21         ` Steven Rostedt

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

Powered by JetHome