Re: INVARIANTS (was Re: RELENG_4 -> 5 -> 6: significant performance regression)



On Sat, May 13, 2006 at 10:52:32AM -0500, Matthew D. Fuller wrote:
On Sat, May 13, 2006 at 10:37:40AM -0400 I heard the voice of
Kris Kennaway, and lo! it spake thus:

With respect to INVARIANTS, you just need to get used to the fact
that running thousands of checks for bugs is incompatible with
running at optimal speed.

(I'm not sure what the point of saying this is, really, but I'll say
it anyway.)

I've run all my systems with INVARIANTS for at least as long as I've
known it was there. While more performance is always good, hardly any
of my systems are so constrained as to need every bit of suds all the
time; trading off a bit of performance for a better chance of catching
a problem before it really screws something up is just a no-brainer.

Additionally (and especially on -CURRENT), I run it because I think
more people run it than don't, and while theoretically it should just
add checks, I know there are places where it changes code paths much
more than that. So, the !(INVARIANTS) code paths don't get exercised
as much, and I worry about bugs hiding there that don't get found (I
think I recall a case or three over the years of just that happening).
Like everyone, I'm sure, I'm all for ferreting out bugs and getting
them fixed, but I'd rather not have to bust my virtual face on the
virtual concrete to do it ;)

FYI, INVARIANTS adds checks but does not (is not supposed to) divert
code paths.

Kris

Attachment: pgpWhB7IgGXVZ.pgp
Description: PGP signature



Relevant Pages

  • Re: A Collections Framework?
    ... object B was calling that getter and then modifying the returned ... Such behavior is a likely source of bugs. ... // override List-modifications here thus ensuring invariants. ... pieces of code that go by the name of algorithm. ...
    (comp.lang.lisp)
  • INVARIANTS (was Re: RELENG_4 -> 5 -> 6: significant performance regression)
    ... I've run all my systems with INVARIANTS for at least as long as I've ... the!code paths don't get exercised ... and I worry about bugs hiding there that don't get found (I ... but I'd rather not have to bust my virtual face on the ...
    (freebsd-stable)
  • Re: RELENG_4 -> 5 -> 6: significant performance regression
    ... On Fri, 12 May 2006, Kris Kennaway wrote: ... under the same conditions (and with INVARIANTS!);( ... proceed to detailed profiling traces as I previously mentioned. ... are going to find the most bugs. ...
    (freebsd-stable)
  • Re: Is MTX_CONTESTED evil?
    ... that certainly explains the blitz of crashes I had to fix ... Since INVARIANTS and WITNESS are on by default, ... Making ADAPTIVE_MUTEXES default will not catch more bugs, ...
    (freebsd-arch)
  • Re: INVARIANTS (was Re: RELENG_4 -> 5 -> 6: significant performance regression)
    ... INVARIANTS adds checks but does not divert ... code paths. ... It does at least in UMA; it does a lot of bzero/NULL'ing out of ...
    (freebsd-stable)