From: Mikael Pettersson <mikpe@csd.uu.se>
To: Corey Minyard <minyard@acm.org>
Cc: lkml <linux-kernel@vger.kernel.org>
Subject: Re: Patch to 2.6.8.1-mm2 to allow multiple NMI handlers to be registered
Date: Thu, 19 Aug 2004 17:29:31 +0200 [thread overview]
Message-ID: <16676.51035.924323.992044@alkaid.it.uu.se> (raw)
In-Reply-To: <4124BACB.30100@acm.org>
Corey Minyard writes:
> +static int k7_watchdog_reset(int handled)
> +{
> + unsigned int low, high;
> + int source;
> +
> + rdmsr(MSR_K7_PERFCTR0, low, high);
Please use rdpmc() instead of rdmsr() when reading counter registers.
Ditto in the other places.
(I know oprofile doesn't, but that's no excuse.)
> + /*
> + * If the timer has overflowed, this is certainly a watchdog
> + * source
> + */
> + source = (low & (1 << 31)) == 0;
> + if (source)
Why not "if ((int)low >= 0)"?
> + /*
> + * The only thing that SHOULD be before us is the oprofile
> + * code. If it has handled an NMI, then we shouldn't. This
> + * is a rather unnatural relationship, it would much better to
> + * build a perf-counter handler and then tie both the
> + * watchdog and oprofile code to it. Then this ugliness
> + * could go away.
> + */
Depending on the value of nmi_watchdog and how oprofile was
set up, neither, just one, or both of them can cause NMIs.
Only one of them can do it via the performance counters, however.
How do you handle multiple simultaneous NMIs from different sources?
next prev parent reply other threads:[~2004-08-19 15:36 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-08-19 14:35 Corey Minyard
2004-08-19 15:29 ` Mikael Pettersson [this message]
2004-08-19 16:16 ` Corey Minyard
2004-08-19 16:27 ` Mikael Pettersson
2004-08-19 16:45 ` Andreas Schwab
2004-08-19 16:31 ` John Levon
2004-08-20 22:42 ` Zwane Mwaikambo
2004-08-19 19:15 ` Corey Minyard
2004-08-19 16:40 ` Andreas Dilger
2004-08-19 19:27 ` Corey Minyard
2004-08-21 10:26 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=16676.51035.924323.992044@alkaid.it.uu.se \
--to=mikpe@csd.uu.se \
--cc=linux-kernel@vger.kernel.org \
--cc=minyard@acm.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®