mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: tip-bot for Kirill V Tkhai <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@kernel.org,
	rostedt@goodmis.org, peterz@infradead.org, tkhai@yandex.ru,
	tglx@linutronix.de
Subject: [tip:sched/core] sched/rt: Do not try to push tasks if pinned task switches to RT
Date: Fri, 18 Apr 2014 06:06:34 -0700	[thread overview]
Message-ID: <tip-10447917551e0fffb8d1892d46e633c3e0a9c1ec@git.kernel.org> (raw)
In-Reply-To: <20140312061833.3a43aa64@gandalf.local.home>

Commit-ID:  10447917551e0fffb8d1892d46e633c3e0a9c1ec
Gitweb:     http://git.kernel.org/tip/10447917551e0fffb8d1892d46e633c3e0a9c1ec
Author:     Kirill V Tkhai <tkhai@yandex.ru>
AuthorDate: Wed, 12 Mar 2014 06:18:33 -0400
Committer:  Ingo Molnar <mingo@kernel.org>
CommitDate: Fri, 18 Apr 2014 12:07:23 +0200

sched/rt: Do not try to push tasks if pinned task switches to RT

Just switched pinned task is not able to be pushed. If the rq had had
several RT tasks before they have already been considered as candidates
to be pushed (or pulled).

Signed-off-by: Kirill V Tkhai <tkhai@yandex.ru>
Acked-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/20140312061833.3a43aa64@gandalf.local.home
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 kernel/sched/rt.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/kernel/sched/rt.c b/kernel/sched/rt.c
index bd2267a..1e4992e 100644
--- a/kernel/sched/rt.c
+++ b/kernel/sched/rt.c
@@ -1892,9 +1892,9 @@ static void switched_to_rt(struct rq *rq, struct task_struct *p)
 	 */
 	if (p->on_rq && rq->curr != p) {
 #ifdef CONFIG_SMP
-		if (rq->rt.overloaded && push_rt_task(rq) &&
+		if (p->nr_cpus_allowed > 1 && rq->rt.overloaded &&
 		    /* Don't resched if we changed runqueues */
-		    rq != task_rq(p))
+		    push_rt_task(rq) && rq != task_rq(p))
 			check_resched = 0;
 #endif /* CONFIG_SMP */
 		if (check_resched && p->prio < rq->curr->prio)

      parent reply	other threads:[~2014-04-18 13:07 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-29 14:45 Kirill Tkhai
2014-03-12 10:18 ` [PATCH]sched/rt: " Steven Rostedt
2014-03-12 10:39   ` Nicholas Mc Guire
2014-03-12 12:23     ` Kirill Tkhai
2014-03-20 18:21       ` Steven Rostedt
2014-03-12 13:33   ` Peter Zijlstra
2014-04-18 13:06   ` tip-bot for Kirill V Tkhai [this message]

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:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

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

  git send-email \
    --in-reply-to=tip-10447917551e0fffb8d1892d46e633c3e0a9c1ec@git.kernel.org \
    --to=tipbot@zytor.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=peterz@infradead.org \
    --cc=rostedt@goodmis.org \
    --cc=tglx@linutronix.de \
    --cc=tkhai@yandex.ru \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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