From: Chris Friesen <chris.friesen@windriver.com>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: rt-users <linux-rt-users@vger.kernel.org>
Subject: Re: which kernel thread handles NMIs?
Date: Mon, 3 Nov 2014 23:20:49 -0600 [thread overview]
Message-ID: <54586231.2030007@windriver.com> (raw)
In-Reply-To: <20141103203545.1ee168fd@gandalf.local.home>
On 11/03/2014 07:35 PM, Steven Rostedt wrote:
> On Mon, 3 Nov 2014 15:08:19 -0600
> Chris Friesen <chris.friesen@windriver.com> wrote:
>
>> We're running with the 3.4 kernel with RT patch, and we're trying to
>> debug some issues.
>>
>> One of the issues is that the magic sysrq "l" command to show a stack
>> backtrace on all CPUs doesn't seem to work, though other magic sysrq
>> commands do work properly.
>
> I actually have a series of patches that would make this work nicely on
> -rt. I'm working on them now but they are for mainline, which means if
> you want them you will need to backport the code. Shouldn't be too hard.
>
>>
>> Looking at the code, for X86 it seems to call
>> apic->send_IPI_all(NMI_VECTOR);
>>
>> Does anyone know what kernel thread would handle NMI_VECTOR? I want to
>> make sure its priority is sufficiently high.
>>
>
> Um, NMI is not a thread. It's a "Non-Maskable Interrupt". Which means
> that nothing will stop it from coming in. This is determined by
> hardware, and not a -rt vs mainline thing.
Yeah, I know what NMI is. :) I don't have all that much experience with
the RT kernels though, so I was wondering if the IPI NMI handler got
turned into a kernel thread the way that most of the other interrupt
handlers do.
> Your issue is that due to deadlocks that printk can cause, the -rt
> patch has code to prevent printing from interrupt disabled
> (including NMI) context, because some of the printk routines can sleep,
> and we can't let that happen if interrupts are disabled.
Ah, okay. That makes sense.
> As I said. I have patches that will place the sysrq-l data into a
> temporary buffer and will print them out after all the NMIs have
> finished. And this is done from a nice preemptable context.
>
> You can look at my test code here:
>
> git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace.git
> rfc/seq-buf
>
> As these may be a bit too complex to backport (the original code had
> complaints, and I needed to do much more to get this acceptable), you
> may want to look at the original RFC patches:
>
> http://marc.info/?l=linux-kernel&m=140321402925869&w=2
>
> These may be much easier to backport.
Excellent, thanks! That sounds like just the ticket.
Chris
prev parent reply other threads:[~2014-11-04 5:20 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-03 21:08 which kernel thread handles NMIs? Chris Friesen
2014-11-04 1:35 ` Steven Rostedt
2014-11-04 5:20 ` Chris Friesen [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=54586231.2030007@windriver.com \
--to=chris.friesen@windriver.com \
--cc=linux-rt-users@vger.kernel.org \
--cc=rostedt@goodmis.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.