lkml.org 
[lkml]   [2014]   [Dec]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [GIT PULL] tracing/NMI/printk: Use seq_buf for safe printing from NMI context
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


\
 
 \ /
  Last update: 2014-12-08 16:21    [W:0.065 / U:0.260 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site