generic_stop_cpus: pull timeout logic from under DIAGNOSTIC
... and also increase the timeout. It's better to try to proceed somehow despite stuck CPUs than to hang indefinitely. Especially so during shutdown and when entering kdb or panic. Timeout value is still an aribitrary value. Timeout diagnostic is just a printf; the work on something more debuggable is planned by attilio. Need to be careful here as stop_cpus_hard is called very early while enetering kdb and soon(-ish) it may become called very early when entering panic. Reviewed by: attilio MFC after: 2 months
This commit is contained in:
parent
31a073f6e1
commit
57d68644db
@ -236,12 +236,10 @@ generic_stop_cpus(cpuset_t map, u_int type)
|
||||
/* spin */
|
||||
cpu_spinwait();
|
||||
i++;
|
||||
#ifdef DIAGNOSTIC
|
||||
if (i == 100000) {
|
||||
if (i == 100000000) {
|
||||
printf("timeout stopping cpus\n");
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
stopping_cpu = NOCPU;
|
||||
|
Loading…
Reference in New Issue
Block a user