From: Stephane Eranian <eranian@hpl.hp.com>
To: linux-kernel@vger.kernel.org
Cc: perfctr-devel@lists.sourceforge.net, perfmon@napali.hpl.hp.com
Subject: NMI watchdog logic on X86-64
Date: Tue, 13 Dec 2005 08:15:57 -0800 [thread overview]
Message-ID: <20051213161557.GF12669@frankl.hpl.hp.com> (raw)
Hello,
In the context of the perfmon2 interface, I am trying to understand
the NMI watchdog logic on X86-64 (I think this is identical on IA-32).
I am looking at the case where the NMI watchdog uses the Local APIC
and the performance counters (AMD or P4). The code of reference
is in 2.6.15.rc5-git1 arch/x86_64/kernel/nmi.c.
It is not clear to me what is going in the case of an SMP machine.
I would like to use reserve_lapic_nmi() and release_lapic_nmi()
from perfmon2 to start/stop the NMI watchdog while we have active
monitoring (i.e., get the performance counters back). The perfctr
subsystem is coded similarly.
The call reserve_lapic_nmi() invokes enable_lapic_nmi_watchdog() which
ends up in setup_apic_nmi_watchdog(). That function is executed only
on the calling processor. In SMP it means one CPU does the NMI watchdog.
In the case of the LAPIC APIC, this means that the call to release_lapic_nmi()
MUST be done on the same CPU as the one used for reserve_lapic_nmi() otherwise
the NMI watchdog setup for the performance counters will not be quiesced.
I would like to make sure that the logic of the code is that ONLY one processor
does the NMI watchdog timer?
In that case, I think it would be good to document or enforce the fact that when
Local APIC is used, calls to reserve and release must be made on the same processor.
Am I missing something here?
--
-Stephane
next reply other threads:[~2005-12-13 16:17 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-12-13 16:15 Stephane Eranian [this message]
[not found] ` <20051217123649.dd2743f4.akpm@osdl.org>
[not found] ` <m1mziz77l9.fsf@ebiederm.dsl.xmission.com>
2005-12-19 15:00 ` Stephane Eranian
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=20051213161557.GF12669@frankl.hpl.hp.com \
--to=eranian@hpl.hp.com \
--cc=linux-kernel@vger.kernel.org \
--cc=perfctr-devel@lists.sourceforge.net \
--cc=perfmon@napali.hpl.hp.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®