Re: Stop scheduler on panic

From: Andriy Gapon <avg_at_FreeBSD.org>
Date: Wed, 07 Dec 2011 09:41:30 +0200
on 07/12/2011 00:11 Attilio Rao said the following:
> I'd just change this check on panicstr:
> _at__at_ -606,9 +603,13 _at__at_ 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
Received on Wed Dec 07 2011 - 06:41:37 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:21 UTC