提交 1d4c4440 编写于 作者: B Bin Wang 提交者: Zheng Zengkai

x86/kdump: make crash kernel boot faster

euleros inclusion
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I4SJBG?from=project-issue
CVE: NA

---------------------------

If other cpus offline before handle the crash NMI, the
waiting_for_crash_ipi can not be decreased to 0, and
current cpu will wait 1 second. So break if all other
cpus offline.
Signed-off-by: NBin Wang <wangbin224@huawei.com>
Reviewed-by: Nluo chunsheng <luochunsheng@huawei.com>
Reviewed-by: NYang Jihong <yangjihong1@huawei.com>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
上级 d344734b
......@@ -871,6 +871,14 @@ void nmi_shootdown_cpus(nmi_shootdown_cb callback)
msecs = 1000; /* Wait at most a second for the other cpus to stop */
while ((atomic_read(&waiting_for_crash_ipi) > 0) && msecs) {
/*
* If other cpus offline before handle the crash NMI, the
* waiting_for_crash_ipi can not be decreased to 0, and
* current cpu will wait 1 second. So break if all other
* cpus offline.
*/
if (num_online_cpus() == 1)
break;
mdelay(1);
msecs--;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册