public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Mike Galbraith <efault@gmx.de>
To: Yong Zhang <yong.zhang0@gmail.com>
Cc: Hillf Danton <dhillf@gmail.com>,
	Steven Rostedt <rostedt@goodmis.org>,
	LKML <linux-kernel@vger.kernel.org>, Ingo Molnar <mingo@elte.hu>,
	Peter Zijlstra <peterz@infradead.org>
Subject: Re: [PATCH] sched: fix need_resched() when checking peempt
Date: Wed, 25 May 2011 06:44:37 +0200	[thread overview]
Message-ID: <1306298677.4819.35.camel@marge.simson.net> (raw)
In-Reply-To: <BANLkTi=7C1jkKau_Lt7BxJ_PKrzE67incg@mail.gmail.com>

On Wed, 2011-05-25 at 12:34 +0800, Yong Zhang wrote:
> On Wed, May 25, 2011 at 11:24 AM, Yong Zhang <yong.zhang0@gmail.com> wrote:
> > On Tue, May 24, 2011 at 9:50 PM, Hillf Danton <dhillf@gmail.com> wrote:
> >> On Tue, May 24, 2011 at 9:39 PM, Steven Rostedt <rostedt@goodmis.org> wrote:
> >>> 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.
> >>> ----
> >>>
> >> Thanks, it is great changelog:)
> >
> > Good catch.
> >
> > Reviewed-by: Yong Zhang <yong.zhang0@gmail.com>
> >
> > BTW, this may be the reason for we could trigger
> > WARN_ON_ONCE(test_tsk_need_resched(next));
> > https://lkml.org/lkml/2010/12/20/28
> >
> > Peter, Mike, how do you think about it?
> 
> Since rq->lock protects both, that issue needs more digging :)

Yeah, good rainy day project.

	-Mike


  reply	other threads:[~2011-05-25  4:44 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-24 13:27 [PATCH] sched: fix need_resched() when checking peempt Hillf Danton
2011-05-24 13:39 ` Steven Rostedt
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 [this message]
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=1306298677.4819.35.camel@marge.simson.net \
    --to=efault@gmx.de \
    --cc=dhillf@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=peterz@infradead.org \
    --cc=rostedt@goodmis.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