lkml.org 
[lkml]   [2015]   [May]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Subject[RFC] how to perform a safe NMI stack trace on all CPUs on x86?
Date
Hi all,

In kernel before 3.19, 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().

The commit a9edc88093287183ac934be44f295f183b2c62dd (x86/nmi: Perform a safe
NMI stack trace on all CPUs) fix this problem on kernel mainline. 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. But how do we fix this problem in older version of kernel(eg, 3.10 stable)?
The 3.10 stable has no "switch printk routine" and "seq_buf" infrastructures.

Could anyone give me some ideas?

Best Regards
Wang Long
\
 
 \ /
  Last update: 2015-05-13 16:41    [W:0.044 / U:1.304 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site