mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: Hillf Danton <dhillf@gmail.com>
Cc: LKML <linux-kernel@vger.kernel.org>, Ingo Molnar <mingo@elte.hu>,
	Peter Zijlstra <peterz@infradead.org>,
	Mike Galbraith <efault@gmx.de>,
	Yong Zhang <yong.zhang0@gmail.com>
Subject: Re: [PATCH] sched: fix need_resched() when checking peempt
Date: Tue, 24 May 2011 09:39:43 -0400	[thread overview]
Message-ID: <1306244383.1465.59.camel@gandalf.stny.rr.com> (raw)
In-Reply-To: <BANLkTin4OiDiPO3znMvKTVZcYukHReydMQ@mail.gmail.com>

On Tue, 2011-05-24 at 21:27 +0800, Hillf Danton wrote:
> When checking if current task could be preempted by a newly woken task,
> further check could be bypassed if the current thread is different from
> the current task of run-queue, and it is corrected accordingly.

Ug, that change log is an obfuscated mess. But looking at the actual
patch, I figured what you wanted to say. How about this:

----
The RT preempt check tests the wrong task if NEED_RESCHED is set. It
currently checks the local CPU task. It is suppose to check the task
that is running on the run queue we are about to wake another task on.
----


> 
> Signed-off-by: Hillf Danton <dhillf@gmail.com>

With a new change log:

Acked-by: Steven Rostedt <rostedt@goodmis.org>

-- Steve

> ---
> 
> --- tip-git/kernel/sched_rt.c	Sun May 22 20:12:01 2011
> +++ sched_rt.c	Tue May 24 20:31:27 2011
> @@ -1074,7 +1074,7 @@ static void check_preempt_curr_rt(struct
>  	 * to move current somewhere else, making room for our non-migratable
>  	 * task.
>  	 */
> -	if (p->prio == rq->curr->prio && !need_resched())
> +	if (p->prio == rq->curr->prio && !test_tsk_need_resched(rq->curr))
>  		check_preempt_equal_prio(rq, p);
>  #endif
>  }



  reply	other threads:[~2011-05-24 13:39 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-24 13:27 Hillf Danton
2011-05-24 13:39 ` Steven Rostedt [this message]
2011-05-24 13:50   ` Hillf Danton
2011-05-25  3:24     ` Yong Zhang
2011-05-25  4:34       ` Yong Zhang
2011-05-25  4:44         ` Mike Galbraith
2011-05-31  3:26     ` Mike Galbraith
2011-05-31 13:18       ` [PATCH resend] " Hillf Danton

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=1306244383.1465.59.camel@gandalf.stny.rr.com \
    --to=rostedt@goodmis.org \
    --cc=dhillf@gmail.com \
    --cc=efault@gmx.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=peterz@infradead.org \
    --cc=yong.zhang0@gmail.com \
    /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

all inboxes | Powered by JetHome®