public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Cc: Ingo Molnar <mingo@elte.hu>, Mark Knecht <markknecht@gmail.com>,
	Clark Williams <williams@redhat.com>,
	Robert Crocombe <rwcrocombe@raytheon.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	john stultz <johnstul@us.ibm.com>
Subject: [PATCH -rt 2/2] Fix condition in default_idle
Date: Fri, 26 May 2006 12:06:53 -0400	[thread overview]
Message-ID: <20060526161036.915977618@goodmis.org> (raw)
In-Reply-To: 20060526160651.870725515@goodmis.org

[-- Attachment #1: fix-default_idle.patch --]
[-- Type: text/plain, Size: 901 bytes --]

The condition statement in default_idle had the conjunctions backwards.
Instead of && it had || so the idle thread would never be preempted.

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

Index: linux-2.6.16-rt23/arch/x86_64/kernel/process.c
===================================================================
--- linux-2.6.16-rt23.orig/arch/x86_64/kernel/process.c	2006-05-26 10:41:30.000000000 -0400
+++ linux-2.6.16-rt23/arch/x86_64/kernel/process.c	2006-05-26 10:41:44.000000000 -0400
@@ -120,9 +120,9 @@ void default_idle(void)
 
 	clear_thread_flag(TIF_POLLING_NRFLAG);
 	smp_mb__after_clear_bit();
-	while (!need_resched() || !need_resched_delayed()) {
+	while (!need_resched() && !need_resched_delayed()) {
 		local_irq_disable();
-		if (!need_resched() || !need_resched_delayed())
+		if (!need_resched() && !need_resched_delayed())
 			safe_halt();
 		else
 			local_irq_enable();

--

  parent reply	other threads:[~2006-05-26 16:11 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-05-26 16:06 [PATCH -rt 0/2] Get x86_64 running with PREEMPT_RT Steven Rostedt
2006-05-26 16:06 ` [PATCH -rt 1/2] Dont blindly turn on interrupts in boot_override_clocksource Steven Rostedt
2006-05-26 17:39   ` Ingo Molnar
2006-05-26 16:06 ` Steven Rostedt [this message]
2006-05-26 17:39   ` [PATCH -rt 2/2] Fix condition in default_idle Ingo Molnar
2006-05-26 18:19 ` [PATCH -rt 0/2] Get x86_64 running with PREEMPT_RT Clark Williams

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=20060526161036.915977618@goodmis.org \
    --to=rostedt@goodmis.org \
    --cc=johnstul@us.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=markknecht@gmail.com \
    --cc=mingo@elte.hu \
    --cc=rwcrocombe@raytheon.com \
    --cc=tglx@linutronix.de \
    --cc=williams@redhat.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