Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 7 Sep 2015 16:52:19 -0600
From:      Warner Losh <imp@bsdimp.com>
To:        Pawel Jakub Dawidek <pjd@FreeBSD.org>
Cc:        "freebsd-arch@freebsd.org" <arch@freebsd.org>
Subject:   Re: exporting INVARIANTS easily
Message-ID:  <D2DAE86C-F7A5-46C7-95B5-42927927AB5A@bsdimp.com>
In-Reply-To: <20150907224808.GC1778@garage.freebsd.pl>
References:  <EC6B1705-8189-436C-9E47-20E8A4AF8488@bsdimp.com> <20150907212943.GB1778@garage.freebsd.pl> <CANCZdfqNE9z6bfDzcadLVYJkKpXyzURZZ9jAYs5hF4TZ377Cvw@mail.gmail.com> <20150907224808.GC1778@garage.freebsd.pl>

index | next in thread | previous in thread | raw e-mail

[-- Attachment #1 --]

> On Sep 7, 2015, at 4:48 PM, Pawel Jakub Dawidek <pjd@FreeBSD.org> wrote:
> 
> 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 <pjd@freebsd.org> 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’t one
>>> of those
>>>> features.
>>>> 
>>>> https://reviews.freebsd.org/D3488
>>>> 
>>>> implements debug.invariants. Please comment.
>>>> 
>>>> I’d thought about adding it to the kern.features sysctl, but thought
>>> better of it since it
>>>> isn’t 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’t built that way and this won’t reflect that. There’s 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’t accidentally include INVARIANTS
>>> systems
>>>> in the performance number, we’ve adding a key to an internal database
>>> that’s 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.
> 
> 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.

I don’t have any direct numbers, but the belief is that we’ll see between 10-20%
drop in our peak throughput with an INVARIANTS kernel.

Warner


[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----
Comment: GPGTools - https://gpgtools.org

iQIcBAEBCgAGBQJV7hUkAAoJEGwc0Sh9sBEAhTwP/jDWBBk+C0AEiTjKaqtE2AM7
v0AsyL/1dbgxihybK728U1EOE9PeQuaXqfwrlQ1nCcdH06snq62iagiHibyksGAa
RZrLZRv9MYDq0nvVf42FFdRRbwAAimwLumzCEJtfyxgA3pcRd4EnLxZA6f6kwoga
WzJho1gI5qK6eMwzZx+uz0K5dWgXQJSWpJzTiFkHyOQV6skmpZcxIVQDnQF1sAuA
XAZlx3XqNCEi8uzjVgf5XytkCVNp6tB9Fjc82gRM249QVLSBkQIeSu8IDjk8xeEk
xNtg3BM3G8TwjeRmHDGM2c27pkaaK1cWe/tBM3fyqUOZuxSLDc/lzkj11Jgntuek
krdRShitMRUgDsVtUlAemroB5fg9nONzuRI91tDraArQocE1b2dZARAw0/9jWXsp
OnsXH2z4NDalEY2Do6kZy65G8KpRC2dVHRpmquU/yUog6HhdOS/afglfwYvXY/zt
Jff5nmk1iQvT4KyryZIPfvMmf7disJlf0cuWoUMVDVPZnx5NRHxNcekqs1i0Asbo
Bz6sE5zyCSsXEXi7X32Xp3v1XVgUukiDGREbw8w6ejSz/32xaq8gpUJLCpxTvdxb
jfmxB5KhOPtDAvUB6wh9MOKIZr2bbavXmwhZut3GyuunALzXaYMOtxr1jejdk+zn
HiHdh1+w6ASlSZjZCnnq
=xBM0
-----END PGP SIGNATURE-----
help

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?D2DAE86C-F7A5-46C7-95B5-42927927AB5A>