From owner-freebsd-arch@freebsd.org Mon Sep 7 22:47:54 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 8F1DA9CD164 for ; Mon, 7 Sep 2015 22:47:54 +0000 (UTC) (envelope-from pawel@dawidek.net) 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 73A5D15F0 for ; Mon, 7 Sep 2015 22:47:54 +0000 (UTC) (envelope-from pawel@dawidek.net) Received: by mailman.ysv.freebsd.org (Postfix) id 727019CD163; Mon, 7 Sep 2015 22:47:54 +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 583DC9CD162 for ; Mon, 7 Sep 2015 22:47:54 +0000 (UTC) (envelope-from pawel@dawidek.net) Received: from mail.dawidek.net (garage.dawidek.net [91.121.88.72]) by mx1.freebsd.org (Postfix) with ESMTP id E916115EF for ; Mon, 7 Sep 2015 22:47:53 +0000 (UTC) (envelope-from pawel@dawidek.net) Received: from localhost (unknown [91.206.210.19]) by mail.dawidek.net (Postfix) with ESMTPSA id D5F87CC5; Tue, 8 Sep 2015 00:47:51 +0200 (CEST) Date: Tue, 8 Sep 2015 00:48:08 +0200 From: Pawel Jakub Dawidek To: Warner Losh Cc: "freebsd-arch@freebsd.org" Subject: Re: exporting INVARIANTS easily Message-ID: <20150907224808.GC1778@garage.freebsd.pl> References: <20150907212943.GB1778@garage.freebsd.pl> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="uXxzq0nDebZQVNAZ" Content-Disposition: inline In-Reply-To: X-OS: FreeBSD 11.0-CURRENT amd64 User-Agent: Mutt/1.5.23 (2014-03-12) 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:47:54 -0000 --uXxzq0nDebZQVNAZ Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Sep 07, 2015 at 04:18:25PM -0600, Warner Losh wrote: > On Mon, Sep 7, 2015 at 3:29 PM, Pawel Jakub Dawidek wro= te: >=20 > > 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 = thought > > 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 t= he > > base > > > kernel isn=E2=80=99t built that way and this won=E2=80=99t reflect th= at. 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. So= me > > 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 INV= ARIANTS > > systems > > > in the performance number, we=E2=80=99ve adding a key to an internal = database > > 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. >=20 >=20 > 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. Do you have some numbers handy? I'd be interested in seeing how much performance drop there is when you have INVARIANTS compiled in, but debug.invariants set to 0. --=20 Pawel Jakub Dawidek http://www.wheelsystems.com FreeBSD committer http://www.FreeBSD.org Am I Evil? Yes, I Am! http://mobter.com --uXxzq0nDebZQVNAZ Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCgAGBQJV7hQoAAoJEJVLhSuxKFt1vdoQAL+e03LJHYfFG9KjgJSraRuv mgslvsqdTiYobgSjgp0t679aARW3ID/VdjeqYvt2ph/phOS76hst2wAmV7ZZWKgF RJBHWK4glpACS4avQhWQyXymyeapC3q4UwRSUVmskVp03BtXyxv18tpsz4rmtts8 SnS+9RCGgXhLKrGK5TVmQjijbEqrOymudno1dNVSagGIK00LORuXGIvkO/OT+MAo YPHuseyOw9sCPpT8P2W+3n7qAWavz8YwNGeg0x6MjPe6OQ1/XO7xugoiNvq/eDg2 gy/Vxttd/CSXdQalLkWYbb5WpMP9uFl71xpKTgYpjkRCxTxTbkTzSo2LuoAxivfq 3y6zGx4ZM7Dr5P/k/kHj/rc+WtcdMvpaAOnB9uj0IhkPMjflQ6kCmU+Ey3Tz6E38 +H2LEr+mhtQ6WUpfywEjnbypHDvirqA8crn8EdP4DDl+LVV3koJ6sEwYusKDhE97 PzkBjnMRSsBdDMgxEglVA2HCP0CxyMKHE1KVEkKPSjbSCfkc99TpvI7cj7TgwXaz bFeytJq7OC649PzHH8Y005EZF2/QWiKTuuokPKlhC82NbvP3GEZy1QEDTC3Hyzbn S6kNpZghtRmOpVWIEKehHZBjR/QADw6lxScMipdTHLEJgK08GLVOzoyWJrJlYaHX 74JjUfpn4LEgBKnrXIGG =4G6i -----END PGP SIGNATURE----- --uXxzq0nDebZQVNAZ--