svn commit: r244112 - head/sys/kern

Andre Oppermann andre at freebsd.org
Tue Dec 18 12:36:19 UTC 2012


On 17.12.2012 23:12, Andriy Gapon wrote:
> on 18/12/2012 00:02 Adrian Chadd said the following:
>> Why are they there, if we just ship production releases with
>> INVARIANTS disabled?
>
> Because there is an axis orthogonal to asserting correctness - performance.

Indeed.  There are, or will be, a couple of very intrusive and expensive
mbuf and socket buffer integrity checks under KASSERT/INVARIANTS that are
not appropriate and performance reducing for productions kernels.  The
same goes for UMA memory fuzzing.  I've always used and placed KASSERTs
with this assumption.

I do have some sympathy for a certain run-time KASSERT() check that will
print a backtrace but won't panic.  However it is a distinct class from
what we have now and needs to be explicitly placed by the programmer to
make sense with the logic around it.

-- 
Andre



More information about the svn-src-all mailing list