Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 07 Dec 2011 09:41:30 +0200
From:      Andriy Gapon <avg@FreeBSD.org>
To:        Attilio Rao <attilio@FreeBSD.org>
Cc:        Kostik Belousov <kostikbel@gmail.com>, arch@FreeBSD.org, current@FreeBSD.org
Subject:   Re: Stop scheduler on panic
Message-ID:  <4EDF18AA.2070509@FreeBSD.org>
In-Reply-To: <CAJ-FndA0f5v%2B7Y_HreqUXwxRwWyEqie1ip2c6==VKME4Bp1u5A@mail.gmail.com>
References:  <20111113083215.GV50300@deviant.kiev.zoral.com.ua> <CAJ-FndCz0wrFojK4_FOrcoQWk6Wd%2Btq%2Br%2BT9PXT%2BLn%2B7hvKB8A@mail.gmail.com> <4EDE8931.1080506@FreeBSD.org> <CAJ-FndA0f5v%2B7Y_HreqUXwxRwWyEqie1ip2c6==VKME4Bp1u5A@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4EDF18AA.2070509>