public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Mike Kravetz <kravetz@us.ibm.com>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: Ingo Molnar <mingo@elte.hu>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: -rt more realtime scheduling issues
Date: Tue, 9 Oct 2007 11:49:53 -0700	[thread overview]
Message-ID: <20071009184953.GA3285@monkey.ibm.com> (raw)
In-Reply-To: <20071009030412.GB12915@goodmis.org>

On Mon, Oct 08, 2007 at 11:04:12PM -0400, Steven Rostedt wrote:
> On Mon, Oct 08, 2007 at 11:45:23AM -0700, Mike Kravetz wrote:
> > Are these accurate statements?  I'll start working on a reliable delivery
> > mechanism for RealTime scheduling.  But, I just want to make sure that
> > is really necessary.
> 
> For i386 I don't think so. Seems that the interrupt handler will set the
> current task to "need_resched" and on exit of the interrupt handler, the
> schedule should take place. I don't see the race (that doesn't mean
> there is one).

The more I try understand the IPI handling the more confused I get. :(
At fist I was concerned about an IPI happening in the middle of the
__schedule routine.  But, then it occurred to me that interrupts are
disabled when in this routine (when holding the runqueue lock).  So, IPIs
are not delivered during __schedule processing.  Right?

But, if this is case then I don't understand the following code in
schedule():

        local_irq_disable();

        do {
                __schedule();
        } while (unlikely(test_thread_flag(TIF_NEED_RESCHED) ||
                          test_thread_flag(TIF_NEED_RESCHED_DELAYED)));

        local_irq_enable();

How can the reschedule flags possibly be set AFTER running __schedule.
Especially when the call is explicitly surrounded by local_irq_disable/
local_irq_enable.

Can someone help me?
-- 
Mike

  parent reply	other threads:[~2007-10-09 18:49 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-06  2:15 -rt more realtime scheduling issues Mike Kravetz
2007-10-08 18:45 ` Mike Kravetz
2007-10-09  3:04   ` Steven Rostedt
2007-10-09  8:16     ` Peter Zijlstra
2007-10-09 18:49     ` Mike Kravetz [this message]
2007-10-10 11:50       ` Steven Rostedt
2007-10-11  2:37         ` Mike Kravetz
2007-10-09  2:46 ` [PATCH RT] fix rt-task scheduling issue Steven Rostedt
2007-10-09  4:18   ` Gregory Haskins
2007-10-09 18:51   ` Mike Kravetz

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=20071009184953.GA3285@monkey.ibm.com \
    --to=kravetz@us.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=rostedt@goodmis.org \
    /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