LKML Archive on
 help / color / Atom feed
From: Kirill Tkhai <>
To: "" <>
Cc: Steven Rostedt <>,
	Ingo Molnar <>,
	Peter Zijlstra <>,
	Tkhai Kirill <>
Subject: [PATCH]sched/rt.c: Add reschedule to switched_from_rt()
Date: Fri, 23 Nov 2012 00:02:15 +0400
Message-ID: <> (raw)

Reschedule rq->curr if the first RT task has just been
pulled to the rq.

Signed-off-by: Kirill V Tkhai <>
CC: Steven Rostedt <>
CC: Ingo Molnar <>
CC: Peter Zijlstra <>
 kernel/sched/rt.c |    7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/kernel/sched/rt.c b/kernel/sched/rt.c
index 418feb0..29bda5b 100644
--- a/kernel/sched/rt.c
+++ b/kernel/sched/rt.c
@@ -1889,8 +1889,11 @@ static void switched_from_rt(struct rq *rq, struct task_struct *p)
 	 * we may need to handle the pulling of RT tasks
 	 * now.
-	if (p->on_rq && !rq->rt.rt_nr_running)
-		pull_rt_task(rq);
+	if (!p->on_rq || rq->rt.rt_nr_running)
+		return;
+	if (pull_rt_task(rq))
+		resched_task(rq->curr);
 void init_sched_rt_class(void)

             reply index

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-22 20:02 Kirill Tkhai [this message]
2012-11-28  3:45 ` Steven Rostedt
2013-01-24 20:36 ` [tip:sched/core] sched/rt: Add reschedule check " tip-bot for Kirill Tkhai

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

LKML Archive on

Archives are clonable:
	git clone --mirror lkml/git/0.git
	git clone --mirror lkml/git/1.git
	git clone --mirror lkml/git/2.git
	git clone --mirror lkml/git/3.git
	git clone --mirror lkml/git/4.git
	git clone --mirror lkml/git/5.git
	git clone --mirror lkml/git/6.git
	git clone --mirror lkml/git/7.git
	git clone --mirror lkml/git/8.git
	git clone --mirror lkml/git/9.git
	git clone --mirror lkml/git/10.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 lkml lkml/ \
	public-inbox-index lkml

Example config snippet for mirrors

Newsgroup available over NNTP:

AGPL code for this site: git clone