From: Mikael Pettersson <mikpe@csd.uu.se>
To: Corey Minyard <cminyard@mvista.com>
Cc: "Heater, Daniel (IndSys, GEFanuc,
VMIC)" <Daniel.Heater@gefanuc.com>,
"'Zwane Mwaikambo'" <zwane@holomorphy.com>,
John Levon <levon@movementarian.org>,
Dipankar Sarma <dipankar@gamebox.net>,
linux-kernel@vger.kernel.org
Subject: Re: NMI handling rework for x86
Date: Fri, 15 Nov 2002 10:50:28 +0100 [thread overview]
Message-ID: <15828.50020.883077.644905@kim.it.uu.se> (raw)
In-Reply-To: <3DD47858.3060404@mvista.com>
Corey Minyard writes:
> diff -urN linux.orig/arch/i386/kernel/nmi_watchdog.c linux/arch/i386/kernel/nmi_watchdog.c
> --- linux.orig/arch/i386/kernel/nmi_watchdog.c Thu Oct 24 19:56:54 2002
> +++ linux/arch/i386/kernel/nmi_watchdog.c Thu Oct 24 20:54:19 2002
...
> +static int k7_watchdog_reset(int handled)
> +{
> + unsigned int low, high;
> + int source;
> +
> + rdmsr(MSR_K7_PERFCTR0, low, high);
> + source = (low & (1 << 31)) == 0;
> + if (source)
> + wrmsr(MSR_K7_PERFCTR0, -(cpu_khz/nmi_hz*1000), -1);
> + return source;
> +}
and similar code in p6 and p4 watchdog_reset.
- Why are you reading the perfctrs with RDMSR instead of RDPMC?
RDMSR is noticeably slower on most post-P5 CPUs.
- "(low & (1 << 31)) == 0" looks like a convoluted and inefficient
way of computing "(int)low >= 0".
- The p6 and k7 watchdog_reset procedures are identicial, except
for the actual MSR number used. The original nmi.c makes the
number a parameter and shares the code, causing less code bloat.
/Mikael
prev parent reply other threads:[~2002-11-15 9:43 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-11-15 4:30 Corey Minyard
2002-11-15 4:40 ` Zwane Mwaikambo
2002-11-15 6:10 ` Dipankar Sarma
2002-11-15 7:40 ` Zwane Mwaikambo
2002-11-15 8:13 ` Dipankar Sarma
2002-11-15 8:18 ` Zwane Mwaikambo
2002-11-15 8:50 ` Dipankar Sarma
2002-11-15 17:41 ` John Levon
2002-11-15 22:46 ` Zwane Mwaikambo
2002-11-15 5:12 ` John Levon
2002-11-15 5:19 ` John Levon
2002-11-15 14:13 ` Corey Minyard
2002-11-15 17:48 ` John Levon
2002-11-15 19:00 ` Corey Minyard
2002-11-15 19:28 ` John Levon
2002-11-15 19:35 ` Corey Minyard
2002-11-17 2:00 ` John Levon
2002-11-17 2:31 ` Zwane Mwaikambo
2002-11-18 16:48 ` Corey Minyard
2002-11-18 15:34 ` Corey Minyard
2002-11-15 5:20 ` Randy.Dunlap
2002-11-15 9:50 ` Mikael Pettersson [this message]
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=15828.50020.883077.644905@kim.it.uu.se \
--to=mikpe@csd.uu.se \
--cc=Daniel.Heater@gefanuc.com \
--cc=cminyard@mvista.com \
--cc=dipankar@gamebox.net \
--cc=levon@movementarian.org \
--cc=linux-kernel@vger.kernel.org \
--cc=zwane@holomorphy.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
all inboxes | Powered by JetHome®