public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: George Anzinger <george@mvista.com>
To: Lee Revell <rlrevell@joe-job.com>
Cc: Ryan Brown <some.nzguy@gmail.com>, Ingo Molnar <mingo@elte.hu>,
	linux-kernel@vger.kernel.org,
	Thomas Gleixner <tglx@linutronix.de>,
	"Paul E. McKenney" <paulmck@us.ibm.com>
Subject: Re: [patch] Real-Time Preemption, -RT-2.6.13-rc4-V0.7.53-01, High Resolution Timers & RCU-tasklist features
Date: Fri, 12 Aug 2005 17:57:55 -0700	[thread overview]
Message-ID: <42FD4593.9030702@mvista.com> (raw)
In-Reply-To: <1123893158.12680.70.camel@mindpipe>

[-- Attachment #1: Type: text/plain, Size: 538 bytes --]

Ingo, all

I, silly person that I am, configured an RT, SMP, PREEMPT_DEBUG system. 
  Someone put code in the NMI path to modify the preempt count which, 
often as not will generate a PREEMPT_DEBUG message as there is no tell 
what state the preempt count is in on an NMI interrupt.  I have sent the 
attached patch to Andrew on this, but meanwhile, if you want RT, SMP, 
PREEMPT_DEBUG you will be much better off with this.
-- 
George Anzinger   george@mvista.com
HRT (High-res-timers):  http://sourceforge.net/projects/high-res-timers/

[-- Attachment #2: fix-nmi-enter.patch --]
[-- Type: text/plain, Size: 1296 bytes --]

Source: MontaVista Software, Inc. George Anzinger <george@mvista.com>
Type: Defect Fix 

Description:

    Modifying a word from NMI code runs the very real risk of loosing
    either then new or the old bits.  Remember, we can not prevent an
    NMI interrupt from ANYWHERE, inparticular between the read and the
    write of a read modify write sequence.

    This patch removes the update of the preempt count from the NMI
    path.

Signed-off-by: George Anzinger<george@mvista.com>

 hardirq.h |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

Index: linux-2.6.13-rc/include/linux/hardirq.h
===================================================================
--- linux-2.6.13-rc.orig/include/linux/hardirq.h
+++ linux-2.6.13-rc/include/linux/hardirq.h
@@ -98,9 +98,12 @@ extern void synchronize_irq(unsigned int
 #else
 # define synchronize_irq(irq)	barrier()
 #endif
-
-#define nmi_enter()		irq_enter()
-#define nmi_exit()		sub_preempt_count(HARDIRQ_OFFSET)
+/*
+ * Re think these.  NMI _must_not_ share data words with non-nmi code
+ * Meanwhile, just do a no-op.
+ */
+#define nmi_enter()	/*	irq_enter()  */
+#define nmi_exit()	/*	sub_preempt_count(HARDIRQ_OFFSET) */
 
 #ifndef CONFIG_VIRT_CPU_ACCOUNTING
 static inline void account_user_vtime(struct task_struct *tsk)

  reply	other threads:[~2005-08-13  1:00 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-08-11 11:00 [patch] Real-Time Preemption, -RT-2.6.13-rc4-V0.7.53-01, High Resolution Timers & RCU-tasklist features Ingo Molnar
2005-08-12  3:07 ` Lee Revell
2005-08-12  3:19   ` Lee Revell
2005-08-12  7:03     ` Ingo Molnar
2005-08-12  7:48     ` Thomas Gleixner
2005-08-12  7:07   ` Ingo Molnar
2005-08-13  0:28 ` Ryan Brown
2005-08-13  0:32   ` Lee Revell
2005-08-13  0:57     ` George Anzinger [this message]
2005-08-14  2:12       ` Ingo Molnar
2005-08-15  6:29         ` Ingo Molnar
2005-08-15 23:39           ` George Anzinger
2005-08-16  6:36             ` Thomas Gleixner
2005-08-15 11:18   ` [patch] Real-Time Preemption, -RT-2.6.13-rc6-V0.7.53-11 Ingo Molnar
2005-08-15 20:35     ` Peter Zijlstra
2005-08-16  3:53       ` Ingo Molnar
2005-08-16 14:35         ` Alan Stern
2005-08-16 16:12           ` Ingo Molnar
2005-08-16 16:56             ` Alan Stern
2005-08-16 17:02               ` Ingo Molnar
2005-08-17  2:23               ` David Brownell
2005-08-17 14:10                 ` Alan Stern
2005-08-17 20:51                   ` David Brownell
2005-08-18  4:52                     ` Ingo Molnar
2005-08-18  6:37                       ` David Brownell
2005-08-18 14:43                         ` Alan Stern
2005-08-22 11:07                         ` Ingo Molnar
2005-08-17  6:31               ` Ingo Molnar
2005-08-16  8:41     ` 2.6.13-rc6-rt1 Ingo Molnar
2005-08-16 12:32       ` 2.6.13-rc6-rt1 Michal Schmidt
2005-08-27  1:15         ` 2.6.13-rc6-rt1 Matt Mackall
2005-08-29 22:36           ` 2.6.13-rc6-rt1 Esben Nielsen
2005-08-17  0:53 ` [patch] KGDB for Real-Time Preemption systems George Anzinger
2005-08-17  6:53   ` Ingo Molnar
2005-08-17 19:16     ` George Anzinger
2005-09-05 12:23   ` Serge Noiraud
2005-09-08  0:37     ` George Anzinger
2005-09-07  8:55   ` Serge Noiraud
2005-09-07 21:16     ` George Anzinger
2005-09-08  8:57       ` Serge Noiraud
2005-09-08 20:47         ` George Anzinger
  -- strict thread matches above, loose matches on Subject: below --
2005-08-11 18:39 [patch] Real-Time Preemption, -RT-2.6.13-rc4-V0.7.53-01, High Resolution Timers & RCU-tasklist features Guillaume Foliard
2005-08-12 12:53 ` Ingo Molnar
2005-08-12 19:27   ` Guillaume Foliard
2005-08-12 19:47     ` Guillaume Foliard
2005-08-12 20:07     ` Chuck Harding

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=42FD4593.9030702@mvista.com \
    --to=george@mvista.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=paulmck@us.ibm.com \
    --cc=rlrevell@joe-job.com \
    --cc=some.nzguy@gmail.com \
    --cc=tglx@linutronix.de \
    /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