Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 6 Dec 2012 09:26:25 +0000 (GMT)
From:      Robert Watson <rwatson@FreeBSD.org>
To:        Vijay Singh <vijju.singh@gmail.com>
Cc:        hackers@freebsd.org
Subject:   Re: KVERIFY for non-debug invariants?
Message-ID:  <alpine.BSF.2.00.1212060923570.78351@fledge.watson.org>
In-Reply-To: <CALCNsJTm5e8KZ5Y%2BCBGrAMzDUbyZSSh%2BG76AHTufJA7y0wnt0g@mail.gmail.com>
References:  <CALCNsJTm5e8KZ5Y%2BCBGrAMzDUbyZSSh%2BG76AHTufJA7y0wnt0g@mail.gmail.com>

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

On Wed, 5 Dec 2012, Vijay Singh wrote:

> All. KASSERT() is a really need way of expressing invariants when INVARIANTS 
> is defined. However for regular, non-INVARIANTS code folks have the typical 
> if() panic() combos, or private macros. Would a KVERIFY() that does this in 
> non-INVARIANTS code make sense?

I'd certainly be fine with something like this.  It might be worth posting to 
arch@ with a code example, as hackers@ has a subset of the potentially 
interested audience.  INVARIANTS has got a bit heavier-weight over the years 
-- the main thing I run into in higher-performance scenarios is its additional 
UMA debugging, which causes a global lock to be acquired during sanity checks. 
It might be worth our pondering adding a new configure option for particularly 
slow invariant tests -- e.g., INVARIANTS_SLOW ... or maybe just 
INVARIANTS_UMA.  However, that's a different issue.

(I sort of feel that things labeled "assert" should be something we can turn 
on in production... so maybe INVARIANTS/KASSERT mission-creep is the issue.)

Robert



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