linux-rt-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Nicholas Mc Guire <der.herr@hofr.at>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: Peter Zijlstra <peterz@infradead.org>,
	Kirill Tkhai <tkhai@yandex.ru>,
	linux-kernel@vger.kernel.org, Ingo Molnar <mingo@kernel.org>,
	linux-rt-users <linux-rt-users@vger.kernel.org>
Subject: Re: [PATCH]sched/rt: Do not try to push tasks if pinned task switches to RT
Date: Wed, 12 Mar 2014 11:39:42 +0100	[thread overview]
Message-ID: <20140312103942.GB5321@opentech.at> (raw)
In-Reply-To: <20140312061833.3a43aa64@gandalf.local.home>

On Wed, 12 Mar 2014, Steven Rostedt wrote:

> Peter,
> 
> I'm going through my inbox (over a year old), and found this patch from
> Kirill. It looks fine to me. You can apply it with my
> 
>   Acked-by: Steven Rostedt <rostedt@goodmis.org>
>
> -- Steve
> 
> [PATCH]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>
> CC: Steven Rostedt <rostedt@goodmis.org>
> CC: Ingo Molnar <mingo@kernel.org>
> CC: Peter Zijlstra <peterz@infradead.org>
> CC: linux-rt-users <linux-rt-users@vger.kernel.org>
> ---
>  kernel/sched/rt.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
> diff --git a/kernel/sched/rt.c b/kernel/sched/rt.c
> index 4e8f0f4..5aab032 100644
> --- a/kernel/sched/rt.c
> +++ b/kernel/sched/rt.c
> @@ -1925,9 +1925,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)

would there not need to be a check for p->migrate_disable ?
push_rt_task() is not checking and so a high prio RT task 
preemting a low prio RT task in a migrate_disable() section
would actually push it off this cpu ? atleast I did not 
find why that would not happen.

thx!
hofrat

  reply	other threads:[~2014-03-12 10:39 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-29 14:45 Re:[PATCH]sched/rt: Do not try to push tasks if pinned task switches to RT Kirill Tkhai
2014-03-12 10:18 ` [PATCH]sched/rt: " Steven Rostedt
2014-03-12 10:39   ` Nicholas Mc Guire [this message]
2014-03-12 12:23     ` Kirill Tkhai
2014-03-20 18:21       ` Steven Rostedt
2014-03-12 13:33   ` Peter Zijlstra
  -- strict thread matches above, loose matches on Subject: below --
2013-01-28 20:23 Kirill Tkhai
2013-01-29  8:42 ` Libo Chen
2013-01-29 13:26 ` Steven Rostedt

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=20140312103942.GB5321@opentech.at \
    --to=der.herr@hofr.at \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rt-users@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=peterz@infradead.org \
    --cc=rostedt@goodmis.org \
    --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;
as well as URLs for NNTP newsgroup(s).