All of lore.kernel.org
 help / color / mirror / Atom feed
* [git pull] sched: do not account for NMIs
@ 2009-02-12 19:29 Steven Rostedt
  2009-02-13 10:03 ` Ingo Molnar
  0 siblings, 1 reply; 3+ messages in thread
From: Steven Rostedt @ 2009-02-12 19:29 UTC (permalink / raw)
  To: LKML, linux-arch
  Cc: Ingo Molnar, Andrew Morton, Thomas Gleixner, Peter Zijlstra,
	Frédéric Weisbecker, Martin Schwidefsky, wli,
	Heiko Carstens


Ingo,

Please pull the latest tip/tracing/core tree, which can be found at:

  git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-2.6-trace.git
tip/tracing/core


Steven Rostedt (1):
      sched: do not account for NMIs

----
 include/linux/hardirq.h |   32 ++++++++++++++++----------------
 1 files changed, 16 insertions(+), 16 deletions(-)
---------------------------
commit 2a7b8df04c11a70105c1abe67d006455d3bdc944
Author: Steven Rostedt <srostedt@redhat.com>
Date:   Thu Feb 12 14:16:46 2009 -0500

    sched: do not account for NMIs
    
    Impact: avoid corruption in system time accounting
    
    Martin Schwidefsky told me that there was an issue with NMIs and
    system accounting. The problem is that the accounting code is
    not reentrant, and if an NMI goes off after an interrupt it can
    corrupt the accounting.
    
    For now, the best we can do is to treat NMIs like SMIs and they
    are not accounted for.
    
    This patch changes nmi_enter to not call __irq_enter and to do
    the preempt-count and tracing calls directly.
    
    Signed-off-by: Steven Rostedt <srostedt@redhat.com>

diff --git a/include/linux/hardirq.h b/include/linux/hardirq.h
index 9841221..faa1cf8 100644
--- a/include/linux/hardirq.h
+++ b/include/linux/hardirq.h
@@ -175,24 +175,24 @@ extern void irq_enter(void);
  */
 extern void irq_exit(void);
 
-#define nmi_enter()				\
-	do {					\
-		ftrace_nmi_enter();		\
-		BUG_ON(in_nmi());		\
-		add_preempt_count(NMI_OFFSET);	\
-		lockdep_off();			\
-		rcu_nmi_enter();		\
-		__irq_enter();			\
+#define nmi_enter()						\
+	do {							\
+		ftrace_nmi_enter();				\
+		BUG_ON(in_nmi());				\
+		add_preempt_count(NMI_OFFSET + HARDIRQ_OFFSET);	\
+		lockdep_off();					\
+		rcu_nmi_enter();				\
+		trace_hardirq_enter();				\
 	} while (0)
 
-#define nmi_exit()				\
-	do {					\
-		__irq_exit();			\
-		rcu_nmi_exit();			\
-		lockdep_on();			\
-		BUG_ON(!in_nmi());		\
-		sub_preempt_count(NMI_OFFSET);	\
-		ftrace_nmi_exit();		\
+#define nmi_exit()						\
+	do {							\
+		trace_hardirq_exit();				\
+		rcu_nmi_exit();					\
+		lockdep_on();					\
+		BUG_ON(!in_nmi());				\
+		sub_preempt_count(NMI_OFFSET + HARDIRQ_OFFSET);	\
+		ftrace_nmi_exit();				\
 	} while (0)
 
 #endif /* LINUX_HARDIRQ_H */


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [git pull] sched: do not account for NMIs
  2009-02-12 19:29 [git pull] sched: do not account for NMIs Steven Rostedt
@ 2009-02-13 10:03 ` Ingo Molnar
  2009-02-13 11:57   ` Ingo Molnar
  0 siblings, 1 reply; 3+ messages in thread
From: Ingo Molnar @ 2009-02-13 10:03 UTC (permalink / raw)
  To: Steven Rostedt
  Cc: LKML, linux-arch, Andrew Morton, Thomas Gleixner, Peter Zijlstra,
	Frédéric Weisbecker, Martin Schwidefsky, wli,
	Heiko Carstens


* Steven Rostedt <rostedt@goodmis.org> wrote:

> Ingo,
> 
> Please pull the latest tip/tracing/core tree, which can be found at:
> 
>   git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-2.6-trace.git
> tip/tracing/core
> 
> 
> Steven Rostedt (1):
>       sched: do not account for NMIs
> 
> ----
>  include/linux/hardirq.h |   32 ++++++++++++++++----------------
>  1 files changed, 16 insertions(+), 16 deletions(-)

pulled into tip:tracing/ftrace, thanks Steve!

Btw., any progress on that ia64/etc. build failure related to the NMI
changes? This regression is blocking the linux-next and -mm exposure
of the latest ftrace changes.

	Ingo

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [git pull] sched: do not account for NMIs
  2009-02-13 10:03 ` Ingo Molnar
@ 2009-02-13 11:57   ` Ingo Molnar
  0 siblings, 0 replies; 3+ messages in thread
From: Ingo Molnar @ 2009-02-13 11:57 UTC (permalink / raw)
  To: Steven Rostedt
  Cc: LKML, linux-arch, Andrew Morton, Thomas Gleixner, Peter Zijlstra,
	Frédéric Weisbecker, Martin Schwidefsky, wli,
	Heiko Carstens


* Ingo Molnar <mingo@elte.hu> wrote:

> Btw., any progress on that ia64/etc. build failure related to the
> NMI changes? 

ah, disregard this - you already sent the fix for that.

	Ingo

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-02-13 11:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-02-12 19:29 [git pull] sched: do not account for NMIs Steven Rostedt
2009-02-13 10:03 ` Ingo Molnar
2009-02-13 11:57   ` Ingo Molnar

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.