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 _______________________________________________ [email protected] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[email protected]"

