Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 7 Sep 2015 16:18:25 -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:  <CANCZdfqNE9z6bfDzcadLVYJkKpXyzURZZ9jAYs5hF4TZ377Cvw@mail.gmail.com>
In-Reply-To: <20150907212943.GB1778@garage.freebsd.pl>
References:  <EC6B1705-8189-436C-9E47-20E8A4AF8488@bsdimp.com> <20150907212943.GB1778@garage.freebsd.pl>

next in thread | previous in thread | raw e-mail | index | archive | help
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=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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CANCZdfqNE9z6bfDzcadLVYJkKpXyzURZZ9jAYs5hF4TZ377Cvw>