Re: [PATCH 26/26 v5] x86/nmi: Perform a safe NMI stack trace on all CPUs

From: Petr Mladek
Date: Tue Nov 18 2014 - 12:02:55 EST

On Fri 2014-11-14 23:59:13, Steven Rostedt wrote:
> From: "Steven Rostedt (Red Hat)" <rostedt@xxxxxxxxxxx>
> When trigger_all_cpu_backtrace() is called on x86, it will trigger an
> NMI on each CPU and call show_regs(). But this can lead to a hard lock
> up if the NMI comes in on another printk().
> In order to avoid this, when the NMI triggers, it switches the printk
> routine for that CPU to call a NMI safe printk function that records the
> printk in a per_cpu seq_buf descriptor. After all NMIs have finished
> recording its data, the seq_bufs are printed in a safe context.
> Link:
> Tested-by: Jiri Kosina <jkosina@xxxxxxx>
> Acked-by: Jiri Kosina <jkosina@xxxxxxx>
> Acked-by: Paul E. McKenney <paulmck@xxxxxxxxxxxxxxxxxx>
> Signed-off-by: Steven Rostedt <rostedt@xxxxxxxxxxx>

Reviewed-by: Petr Mladek <pmladek@xxxxxxx>

I really like that the NMI part is fast and we do not longer
block many CPUs until the others are finished with priting.

Best Regards,
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at