All of lore.kernel.org
 help / color / mirror / Atom feed
From: John Sigler <linux.kernel@free.fr>
To: "Björn Steinbrink" <B.Steinbrink@gmx.de>
Cc: linux-kernel@vger.kernel.org, linux-rt-users@vger.kernel.org
Subject: Re: NMI watchdog
Date: Fri, 12 Oct 2007 12:58:09 +0200	[thread overview]
Message-ID: <470F5341.6030906@free.fr> (raw)
In-Reply-To: <20071012100043.GA28777@atjola.homenet>

Björn Steinbrink wrote:

> John Sigler wrote:
> 
>> I'm experiencing a full system lockup. I'm using an out-of-tree driver 
>> which I suspect is responsible. I'm trying to enable the NMI watchdog.
>>
>> # cat /proc/version
>> Linux version 2.6.22.1-rt9 (gcc version 3.4.6) #1 PREEMPT RT Tue Oct 9 
>> 12:25:47 CEST 2007
>>
>> # cat /proc/cmdline
>> ro root=/dev/hdc1 console=ttyS0,57600n8 console=tty0 panic=3 apic=debug 
>> nmi_watchdog=2
>>
>> However, after boot, the NMI count does not change.
>>
>> # cat /proc/interrupts ; sleep 10 ; cat /proc/interrupts
> 
> Try running some cpu hog in the background. The performance counters get
> increased only when the CPU is actually doing something. On a mostly
> idle system, it can take quite a while for the next NMI to show up.

You are right. In another shell, I ran while true; do : ; done

# cat /proc/interrupts ; sleep 10 ; cat /proc/interrupts
            CPU0
   0:        100   IO-APIC-edge      timer
   4:         82   IO-APIC-edge      serial
   8:          1   IO-APIC-edge      rtc
   9:          0   IO-APIC-fasteoi   acpi
  15:      13648   IO-APIC-edge      ide1
  16:       1303   IO-APIC-fasteoi   eth0
  17:        575   IO-APIC-fasteoi   eth1
  18:        575   IO-APIC-fasteoi   eth2
  19:        575   IO-APIC-fasteoi   eth3
NMI:       2889
LOC:     115768
ERR:          0
MIS:          0

            CPU0
   0:        100   IO-APIC-edge      timer
   4:         82   IO-APIC-edge      serial
   8:          1   IO-APIC-edge      rtc
   9:          0   IO-APIC-fasteoi   acpi
  15:      13672   IO-APIC-edge      ide1
  16:       1310   IO-APIC-fasteoi   eth0
  17:        580   IO-APIC-fasteoi   eth1
  18:        580   IO-APIC-fasteoi   eth2
  19:        580   IO-APIC-fasteoi   eth3
NMI:       2899
LOC:     116770
ERR:          0
MIS:          0

The performance counter appears to be configured to fire when the event 
count for CPU_CLK_UNHALTED reaches 2,400,000,000 (I have a 2.4 GHz CPU) 
i.e. one NMI per second when the CPU is 100% busy. Is that correct?

On a related note, I have a Pentium 3 which counts CPU_CLK_UNHALTED 
cycles even when the CPU is halted. I was told this is a bug, but it 
actually sounds like a a nice feature!

Is there really no way to have the event counter increment with every 
tick (even when the CPU is halted) on a P4?

Regards.

  reply	other threads:[~2007-10-12 10:58 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-12  9:18 NMI watchdog John Sigler
2007-10-12 10:00 ` Björn Steinbrink
2007-10-12 10:58   ` John Sigler [this message]
2007-10-12 10:26 ` Steven Rostedt
2007-10-12 13:26   ` John Sigler
2007-10-12 16:12     ` Steven Rostedt
2007-10-17 12:20       ` John Sigler
2007-10-12 14:48 ` Arjan van de Ven
2007-10-15 16:05   ` John Sigler
  -- strict thread matches above, loose matches on Subject: below --
2015-03-30 12:15 Justin Keller
2015-03-30 12:14 Justin Keller
2015-03-30 17:09 ` Michal Hocko
2009-01-29 23:54 David Miller
2003-11-14 10:12 NMI Watchdog Maciej Zenczykowski
2003-11-14 10:29 ` Mikael Pettersson

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=470F5341.6030906@free.fr \
    --to=linux.kernel@free.fr \
    --cc=B.Steinbrink@gmx.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rt-users@vger.kernel.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 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.