From owner-freebsd-arch@FreeBSD.ORG Fri Aug 9 01:24:10 2013 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id BCDCD6A0 for ; Fri, 9 Aug 2013 01:24:10 +0000 (UTC) (envelope-from uebayasi@gmail.com) Received: from mail-bk0-x22a.google.com (mail-bk0-x22a.google.com [IPv6:2a00:1450:4008:c01::22a]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 501712189 for ; Fri, 9 Aug 2013 01:24:10 +0000 (UTC) Received: by mail-bk0-f42.google.com with SMTP id my10so919152bkb.29 for ; Thu, 08 Aug 2013 18:24:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=W/XvGXj9RxpaLwXSEqsJ8c3Hnt/TT8QKSKUFRfTgV7M=; b=OTxze4w0unAC68o1DXiT+pzRYhWxl+5d/sPa6v52TqAR+Hw10ZK4I8IaTGWZZhjHgg ARJSypUD72O/XhPVKxA8E4aEujZ8ZTQOmBWbi8jU5tSdLwro6RKV+ofo6IyBAT1fgrfy zrXMA+wVp87gGJTxC3EdBm6Vomz7c/njosumKpmtjFPx7apaZJmG0C8qW5i4WC/iGi1r 3K9/i+qbvRXJI+2WFc6qGAHCCocrojSh5FivZ3vlMksnCYRE6MQCEo3KZ3pcUL/4Vx7i CYoKw8aQFX62ibB9hHcEih9ruq8pLYy0Xrh4cmVtsri3Or1F8+NJDm1957csmDAcuTYg y6hg== MIME-Version: 1.0 X-Received: by 10.204.103.5 with SMTP id i5mr1815128bko.176.1376011448492; Thu, 08 Aug 2013 18:24:08 -0700 (PDT) Received: by 10.205.36.9 with HTTP; Thu, 8 Aug 2013 18:24:08 -0700 (PDT) In-Reply-To: <20130808215719.GP4972@kib.kiev.ua> References: <20130808215719.GP4972@kib.kiev.ua> Date: Fri, 9 Aug 2013 10:24:08 +0900 Message-ID: Subject: Re: panic(9) vs. RB_NOSYNC From: Masao Uebayashi To: Konstantin Belousov Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-arch@freebsd.org X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Aug 2013 01:24:10 -0000 On Fri, Aug 9, 2013 at 6:57 AM, Konstantin Belousov wrote: > On Thu, Aug 08, 2013 at 02:36:51PM +0900, Masao Uebayashi wrote: >> panic(9) (actually vpanic()) sets RB_NOSYNC when panicstr is already >> set. What is the reasoning of this? >> >> My understanding is that panic() attempts VFS "sync" operation at >> first. If another panic() is triggered during that, give up VFS >> "sync". Is this correct? If so, how reliable is this design? I >> wonder if attempting such a complex task like VFS "sync" after a panic >> is a good idea. > > Look at the end of the vpanic(), right before kern_reboot() call. > There, kernel does > if (!sync_on_panic) > bootopt |= RB_NOSYNC; > so it only syncs when sync_on_panic sysctl is set to non-zero, which > is zero by default. I didn't notice that. > Basically, this option might be reasonable when you debug something > not related to i/o+VM+storage drivers, and you know what you do. So most of FreeBSD users have been happy without try-sync-after-panic for years. Good to know that, thanks!