From owner-freebsd-current@FreeBSD.ORG Wed Dec 7 07:41:37 2011 Return-Path: Delivered-To: current@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 467951065673; Wed, 7 Dec 2011 07:41:37 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 302918FC0A; Wed, 7 Dec 2011 07:41:35 +0000 (UTC) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id JAA19088; Wed, 07 Dec 2011 09:41:33 +0200 (EET) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1RYC8D-0001FM-IM; Wed, 07 Dec 2011 09:41:33 +0200 Message-ID: <4EDF18AA.2070509@FreeBSD.org> Date: Wed, 07 Dec 2011 09:41:30 +0200 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:8.0) Gecko/20111108 Thunderbird/8.0 MIME-Version: 1.0 To: Attilio Rao References: <20111113083215.GV50300@deviant.kiev.zoral.com.ua> <4EDE8931.1080506@FreeBSD.org> In-Reply-To: X-Enigmail-Version: undefined Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: Kostik Belousov , arch@FreeBSD.org, current@FreeBSD.org Subject: Re: Stop scheduler on panic X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Dec 2011 07:41:37 -0000 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