mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
	Ingo Molnar <mingo@kernel.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Jiri Kosina <jkosina@suse.cz>, Petr Mladek <pmladek@suse.cz>
Subject: Re: [GIT PULL] tracing/NMI/printk: Use seq_buf for safe printing from NMI context
Date: Mon, 8 Dec 2014 10:08:51 -0500	[thread overview]
Message-ID: <20141208100851.3906cc0a@gandalf.local.home> (raw)
In-Reply-To: <20141208100528.5f97106f@gandalf.local.home>

On Mon, 8 Dec 2014 10:05:28 -0500
Steven Rostedt <rostedt@goodmis.org> wrote:


> This code solves the issue of performing stack dumps from NMI context.
> The issue is that printk() is not safe from NMI context as if the NMI
> were to trigger when a printk() was being performed, the NMI could
> deadlock from the printk() internal locks. This has been seen in practice.
> 

One added bonus is that this code also makes the NMI dump stack work on
PREEMPT_RT kernels. As printk() includes sleeping locks on PREEMPT_RT,
printk() only writes to console if the console does not use any
rt_mutex converted spin locks. Which a lot do.

-- Steve

  reply	other threads:[~2014-12-08 15:08 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-08 15:05 Steven Rostedt
2014-12-08 15:08 ` Steven Rostedt [this message]
2014-12-11  4:20   ` Linus Torvalds
2014-12-11  5:29     ` Linus Torvalds
2014-12-11 11:33       ` Steven Rostedt
2014-12-11 19:41         ` Linus Torvalds

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=20141208100851.3906cc0a@gandalf.local.home \
    --to=rostedt@goodmis.org \
    --cc=jkosina@suse.cz \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=pmladek@suse.cz \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.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®