All of lore.kernel.org
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: Mike Kravetz <kravetz@us.ibm.com>
Cc: Ingo Molnar <mingo@elte.hu>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: -rt more realtime scheduling issues
Date: Mon, 8 Oct 2007 23:04:12 -0400	[thread overview]
Message-ID: <20071009030412.GB12915@goodmis.org> (raw)
In-Reply-To: <20071008184523.GA29656@monkey.ibm.com>

On Mon, Oct 08, 2007 at 11:45:23AM -0700, Mike Kravetz wrote:
> On Fri, Oct 05, 2007 at 07:15:48PM -0700, Mike Kravetz wrote:
> > After applying the fix to try_to_wake_up() I was still seeing some large
> > latencies for realtime tasks.
> 
> I've been looking for places in the code where reschedule IPIs should
> be sent in the case of 'overload' to redistribute RealTime tasks based
> on priority.  However, an even more basic question to ask might be:  Are
> the use of reschedule IPIs reliable enough for this purpose.  In the
> code, there is the following comment:
> 
> /*
>  * this function sends a 'reschedule' IPI to another CPU.
>  * it goes straight through and wastes no time serializing
>  * anything. Worst case is that we lose a reschedule ...
>  */
> 
> After a quick read of the code, it does appear that reschedule's can
> be lost if the the IPI is sent at just the right time in schedule
> processing.  Can someone confirm this is actually the case?
> 
> The issue I see is that the 'rt_overload' mechanism depends on reschedule
> IPIs for RealTime scheduling semantics.  If this is not a reliable
> mechanism then this can lead to breakdowns in RealTime scheduling semantics.
> 
> 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).

For x86_64 though, I don't think that we schedule. All the reschedule
vector does is return with a comment:

/*
 * Reschedule call back. Nothing to do,
 * all the work is done automatically when
 * we return from the interrupt.
 */
asmlinkage void smp_reschedule_interrupt(void)
{
        ack_APIC_irq();
}

I'm thinking that this was the case for i386 a while back, and we fixed
it for RT.

/me does a quick search...

http://lkml.org/lkml/2005/5/13/174

Yep!  This is a bug in x86_64. I'll fix this up tomorrow and send out a
patch.

-- Steve


  reply	other threads:[~2007-10-09  3:04 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 [this message]
2007-10-09  8:16     ` Peter Zijlstra
2007-10-09 18:49     ` Mike Kravetz
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=20071009030412.GB12915@goodmis.org \
    --to=rostedt@goodmis.org \
    --cc=kravetz@us.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.