From owner-freebsd-current@FreeBSD.ORG Fri Dec 2 15:30:28 2011 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BF88D106564A; Fri, 2 Dec 2011 15:30:28 +0000 (UTC) (envelope-from mdf356@gmail.com) Received: from mail-pz0-f54.google.com (mail-pz0-f54.google.com [209.85.210.54]) by mx1.freebsd.org (Postfix) with ESMTP id 4A9518FC0C; Fri, 2 Dec 2011 15:30:28 +0000 (UTC) Received: by dafa1 with SMTP id a1so2290085daf.13 for ; Fri, 02 Dec 2011 07:30:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=yASxpo0EcjhZBU4pKPeuHn+g8rezAfnCzPx78tge2Rs=; b=r5iOJd5VcQbFZTD1tLwK3cPxUAWJQEdXKLNR6za0PwiDvJMlJlxgKdWI3oIvkKz69t UsBt3j3cf5QlVnGEM+VderHQhXDcro+rqNXi6NfWWJoqkO0lz0I3lnZH8Df0mSOWVkic 8VFCe9VYsi9e2rBL7mS9pWGKouaLZ2t8Iccfs= MIME-Version: 1.0 Received: by 10.68.21.68 with SMTP id t4mr3082498pbe.42.1322839827915; Fri, 02 Dec 2011 07:30:27 -0800 (PST) Sender: mdf356@gmail.com Received: by 10.68.56.97 with HTTP; Fri, 2 Dec 2011 07:30:27 -0800 (PST) In-Reply-To: <4ED8A306.9020801@FreeBSD.org> References: <20111113083215.GV50300@deviant.kiev.zoral.com.ua> <201112011349.50502.jhb@freebsd.org> <4ED7E6B0.30400@FreeBSD.org> <201112011553.34432.jhb@freebsd.org> <4ED7F4BC.3080206@FreeBSD.org> <4ED855E6.20207@FreeBSD.org> <4ED8A306.9020801@FreeBSD.org> Date: Fri, 2 Dec 2011 07:30:27 -0800 X-Google-Sender-Auth: MCPjHI8l5gLHsOMM-3H_iLUOVwc Message-ID: From: mdf@FreeBSD.org To: Andriy Gapon Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-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: Fri, 02 Dec 2011 15:30:28 -0000 On Fri, Dec 2, 2011 at 2:05 AM, Andriy Gapon wrote: > on 02/12/2011 06:36 John Baldwin said the following: >> Ah, ok (I had thought SCHEDULER_STOPPED was going to always be true when= kdb was >> active). =A0But I think these two changes should cover critical_exit() o= k. >> > > I attempted to start a discussion about this a few times already :-) > Should we treat kdb context the same as SCHEDULER_STOPPED context (in the > current definition) ? =A0That is, skip all locks in the same fashion? > There are pros and contras. Does kdb pause all CPUs with an interrupt (NMI or regular interrupt, I can no longer remember...) when it enters? If so, then I'd say whether it enters via sysctl or panic doesn't matter. It's in a special environment where nothing else is running, which is what is needed for proper exploration of the machine (via breakpoint, for debugging a hang, etc). Maybe the question is, why wouldn't SCHEDULER_STOPPED be true regardless of how kdb is entered? Thanks, matthew