Unverified Commit 590489fe authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!3629 x86/kdump: make crash kernel boot faster

Merge Pull Request from: @ci-robot 
 
PR sync from: zhangnaichuan <zhangnaichuan@huawei.com>
https://mailweb.openeuler.org/hyperkitty/list/kernel@openeuler.org/message/SNQHJG7ITXAZSZSI7D2R7HMYMNGIQUKM/ 
description:
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.


-- 
2.33.0
 
https://gitee.com/openeuler/kernel/issues/I8RJ6X?from=project-issue 
 
Link:https://gitee.com/openeuler/kernel/pulls/3629

 

Reviewed-by: default avatarWei Li <liwei391@huawei.com>
Signed-off-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
parents 21138a06 6414464b
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -925,6 +925,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--;
	}