Stop scheduler on panic
Andriy Gapon
avg at FreeBSD.org
Wed Dec 7 07:41:37 UTC 2011
on 07/12/2011 00:11 Attilio Rao said the following:
> I'd just change this check on panicstr:
> @@ -606,9 +603,13 @@ kdb_trap(int type, int code, struct trapframe *tf)
> intr = intr_disable();
>
> #ifdef SMP
> - other_cpus = all_cpus;
> - CPU_CLR(PCPU_GET(cpuid), &other_cpus);
> - stop_cpus_hard(other_cpus);
> + if (panicstr == NULL) {
> + other_cpus = all_cpus;
> + CPU_CLR(PCPU_GET(cpuid), &other_cpus);
> + stop_cpus_hard(other_cpus);
> + did_stop_cpus = 1;
> + } else
> + did_stop_cpus = 0;
>
> to be SCHEDULER_STOPPED().
Makes sense. I will do this.
> If you agree I can fix the kern_mutex, kern_sx and kern_rwlock parts
> and it should be done.
Since I am not very familiar with the details of that code, I can not be against
such a proposal :-) What Kostik did seemed quite reasonable to me, but if that
can be further improved, then I am all for it.
--
Andriy Gapon
More information about the freebsd-arch
mailing list