From owner-freebsd-current@FreeBSD.ORG Fri Dec 2 17:18:37 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 01698106566B; Fri, 2 Dec 2011 17:18:37 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: from mail-ww0-f50.google.com (mail-ww0-f50.google.com [74.125.82.50]) by mx1.freebsd.org (Postfix) with ESMTP id 0078C8FC1C; Fri, 2 Dec 2011 17:18:35 +0000 (UTC) Received: by wgbdr11 with SMTP id dr11so1547657wgb.31 for ; Fri, 02 Dec 2011 09:18:35 -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=viFy2skkGPD1cV+TX+utZX7Gs6sNbqsQj113vHLUSkw=; b=hyJU6y16Mpuc/mTi4rToTi8yz8WqYk93r9JdfsYHOKU9DKQ7OoZhxffB12dEmY1B5T iZsilSDXFR7jW3e0dNeFUFxP3I9HOEBTd2f1nYzHSTStLYbcHWfHaM/EgM1to6M58mEf hdALNi2GNKWFT0BhJYB311bbg+GTNoUXhpnlY= MIME-Version: 1.0 Received: by 10.227.58.17 with SMTP id e17mr1901153wbh.12.1322846314982; Fri, 02 Dec 2011 09:18:34 -0800 (PST) Sender: asmrookie@gmail.com Received: by 10.216.47.211 with HTTP; Fri, 2 Dec 2011 09:18:34 -0800 (PST) In-Reply-To: <4ED8F1C1.7010206@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> <4ED8F1C1.7010206@FreeBSD.org> Date: Fri, 2 Dec 2011 18:18:34 +0100 X-Google-Sender-Auth: joRi79j2-FJAqkOXVNWfbFg6nlo Message-ID: From: Attilio Rao To: John Baldwin , Konstantin Belousov Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: freebsd-current@freebsd.org, Andriy Gapon 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 17:18:37 -0000 2011/12/2 John Baldwin : > On 12/2/11 5: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 whe= n >>> kdb was >>> active). =C2=A0But I think these two changes should cover critical_exit= () ok. >>> >> >> I attempted to start a discussion about this a few times already :-) >> Should we treat kdb context the same as SCHEDULER_STOPPED context (in th= e >> current definition) ? =C2=A0That is, skip all locks in the same fashion? >> There are pros and contras. > > > kdb should not block on locks, no. =C2=A0Most debugger commands should no= t go > near locks anyway unless they are intended to carefully modify the existi= ng > system in a safe manner (such as the 'kill' command which should only be > using try locks and fail if it cannot safely post the signal). The biggest problem to KDB as the same as panic is that doing proper 'continue' is impossible. One of the features of the 'skip-locking' path is that it doesn't take into account fast locking paths, where sometimes the lock can succeed and other fails and you don't know about them. Also the restarted CPUs can find corrupted datas (as they can be arbitrarely updated), I'm sure it is too much panic prone. BTW, I'm waiting for the details to settle (including the patch we have been discussing internally about binding to CPU0 during ACPI shutdown) before to read the whole thread and start a proper review, would it be possible to have an almost-final version of the patch? Attilio --=20 Peace can only be achieved by understanding - A. Einstein