From: Corey Minyard <cminyard@mvista.com>
To: Zwane Mwaikambo <zwane@holomorphy.com>
Cc: Ingo Molnar <mingo@redhat.com>,
linux-kernel@vger.kernel.org,
John Levon <levon@movementarian.org>
Subject: Re: NMI handling rework
Date: Thu, 07 Nov 2002 10:51:00 -0600 [thread overview]
Message-ID: <3DCA99F4.4090703@mvista.com> (raw)
In-Reply-To: Pine.LNX.4.44.0211070103540.27141-100000@montezuma.mastecende.com
Zwane Mwaikambo wrote:
>On Thu, 7 Nov 2002, Corey Minyard wrote:
>
>
>
>>Ingo et al...
>>
>>Since a lot of things have started tying into the NMI handler (oprofile,
>>nmi watchdog, memory errors, bus error, now the IPMI watchdog), I think
>>it better to use a request/release mechanism for the NMI handlers.
>> Plus, I think the current NMI code is actually not correct, it's
>>theoretically possible to miss NMIs if two occur at the same time. So
>>
>>
>
>How? The NMI interrupt should be internally masked till IRET. I think your
>code is ok, but i don't see how it takes care of concurrent users such as
>oprofile and the nmi watchdog, the nmi watchdog already programs its own
>interrupt interval if its shared, what is the intended base NMI interval?
>How about handlers requiring a different interrupt interval? I have code
>which does the following;
>
NMIs cannot be masked, they are by definition non-maskable :-). You can
get an NMI while executing an NMI.
NMIs are edge-triggered going into the processor. For external
level-generating inputs, this is fine, because if two NMIs are occuring,
you would handle the first, clear it, and there's some code that will
turn off and back on the external NMI, if it is still asserted (by
another input) you would get another NMI. From what I can tell (by
inference, not by direct documentation) at least the IO APIC version is
pulsed, because there is no code to turn it off. If a pulsed and
another NMI occur at the same time, it is possible to miss one. It may
be that this is not important. If so, it's easy to change it to only
handle the first one (since the handlers are supposed to return a value
saying if they handle the NMI or not). I'm not sure about this, maybe
someone who is more familiar with the hardware could comment?
>base NMI poll function with time interval T;
>master queue with slots per timeout;
>slots with task queues which are flushed whenever we hit the timeout;
>
>you can therefore add tasks in with specific time intervals which will get
>triggered. This code currently is only running the nmi watchdog, but i'll
>be experimenting with various other handlers. I'll post a URL soon.
>
>To support external devices which trigger NMI we can simply check wether
>we have hit an nmi interval period, if not we run through the NMI handler
>lists.
>
An NMI-based timer? I can see the use if you REALLY need accurate
intervals, but you can't do much in an NMI, no spinlocks, even.
-Corey
next prev parent reply other threads:[~2002-11-07 15:42 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-11-07 6:44 NMI handling rework Corey Minyard
2002-11-07 6:20 ` Zwane Mwaikambo
2002-11-07 16:51 ` Corey Minyard [this message]
2002-11-07 15:59 ` Maciej W. Rozycki
2002-11-07 16:38 ` Zwane Mwaikambo
2002-11-07 16:59 ` Richard B. Johnson
2002-11-07 19:58 ` Corey Minyard
2002-11-08 15:34 ` Alan Cox
2002-11-07 17:05 ` John Levon
-- strict thread matches above, loose matches on Subject: below --
2002-11-08 15:00 Heater, Daniel (IndSys, GEFanuc, VMIC)
2002-11-08 20:30 ` Zwane Mwaikambo
2002-11-11 15:26 Heater, Daniel (IndSys, GEFanuc, VMIC)
2002-11-15 3:45 ` Corey Minyard
2002-11-15 4:12 ` Zwane Mwaikambo
2002-11-15 4:50 ` Corey Minyard
2002-11-15 5:12 ` Zwane Mwaikambo
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=3DCA99F4.4090703@mvista.com \
--to=cminyard@mvista.com \
--cc=levon@movementarian.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--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