From owner-freebsd-arch@freebsd.org Mon Sep 7 22:18:32 2015 Return-Path: Delivered-To: freebsd-arch@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BEFFB9CC229 for ; Mon, 7 Sep 2015 22:18:32 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id 9C3D618AF for ; Mon, 7 Sep 2015 22:18:32 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mailman.ysv.freebsd.org (Postfix) id 997769CC228; Mon, 7 Sep 2015 22:18:32 +0000 (UTC) Delivered-To: arch@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 80AB69CC227 for ; Mon, 7 Sep 2015 22:18:32 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qg0-f47.google.com (mail-qg0-f47.google.com [209.85.192.47]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4278F18AD for ; Mon, 7 Sep 2015 22:18:31 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by qgx61 with SMTP id 61so69580656qgx.3 for ; Mon, 07 Sep 2015 15:18:25 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=Z7Gr7udVE85S915/vis7xPpwPrmjHI5gEc9nr+8hEFs=; b=IEzj8DpnNEysDM9ssNMGX9ZdHHovmFU7tuDMxKli0gGjI6V6CT+Q50bze2zMCwBbLH vihbzhAY1u4TRtyAiTPT1huuK6ht0c+cMFm3jqyPv0xRMElGX7vPDM0sLfH79zg9d6f/ DExqnej/Ra7UuUr9GGqLMn1Kn53JrKrfyFCQv5iNjkARDmMX9igvFlCP7HXh/D5tbpaB 6PFC//2I4RriazPjbWZTG4hEcLzJ2A2YHH0RW/pUA4FjGorHrakRmx2QuzWv8+qX2w4L 9T+upYvlOoqEUbF10h0AdCQHxfLaJ5t5RovxRCu6wJ+iXI82wLa4fX/JFipDDDmBnIMO m/cQ== X-Gm-Message-State: ALoCoQk+vjo/xkEsfdofP3bXvAB+OxnvXca0TeoAizb0tnbryg9dwVfvKir9ZrbyCeRNgXrWuMYI MIME-Version: 1.0 X-Received: by 10.140.29.3 with SMTP id a3mr29714463qga.97.1441664305332; Mon, 07 Sep 2015 15:18:25 -0700 (PDT) Sender: wlosh@bsdimp.com Received: by 10.140.80.164 with HTTP; Mon, 7 Sep 2015 15:18:25 -0700 (PDT) X-Originating-IP: [69.53.245.5] In-Reply-To: <20150907212943.GB1778@garage.freebsd.pl> References: <20150907212943.GB1778@garage.freebsd.pl> Date: Mon, 7 Sep 2015 16:18:25 -0600 X-Google-Sender-Auth: OTc2PIozvZuS0XggWS_DMrW0bZ8 Message-ID: Subject: Re: exporting INVARIANTS easily From: Warner Losh To: Pawel Jakub Dawidek Cc: "freebsd-arch@freebsd.org" Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Sep 2015 22:18:32 -0000 On Mon, Sep 7, 2015 at 3:29 PM, Pawel Jakub Dawidek wrote= : > On Wed, Aug 26, 2015 at 11:20:06AM -0600, Warner Losh wrote: > > Greetings, > > > > Many of the performance eating features are exported via some kind of > sysctl, usually > > patterned after the case of witness as debug.foo. INVARIANTS isn=E2=80= =99t one > of those > > features. > > > > https://reviews.freebsd.org/D3488 > > > > implements debug.invariants. Please comment. > > > > I=E2=80=99d thought about adding it to the kern.features sysctl, but th= ought > better of it since it > > isn=E2=80=99t a facility that people can use. > > > > If you include the kernel config in the kernel, you can get this > information via > > config -x | grep INVARIANTS > > but not all kernels do that. This is more robust. > > > > I also know that you can load some modules compiled INVARIANTS when the > base > > kernel isn=E2=80=99t built that way and this won=E2=80=99t reflect that= . There=E2=80=99s no good > want to include > > that information and is an uncommon use case. > > > > Our use case? We have a raft of test machines. Most run without > INVARIANTS since > > we want to characterize the performance of the release under test. Some > are running > > INVARIANTS since we want to test the robustness as well, even at the > expense of > > some performance. To ensure we don=E2=80=99t accidentally include INVAR= IANTS > systems > > in the performance number, we=E2=80=99ve adding a key to an internal da= tabase > that=E2=80=99s driven > > off this sysctl. > > > > Comments? > > As long as the ultimate goal is to have INVARIANTS in GENERIC I'm all > for it! I use to run even production machines with INVARIANTS, which was > helpful to catch VirtualBox's kernel memory corruption, but we've moved > to GENERIC since I wanted to use freebsd-update. Having INVARIANTS in > GENERIC would be great. That's not my goal. And I doubt my employer would run it in their kernel config because it costs too much in bandwidth when we're streaming all that video people binge watch. Warner