From owner-svn-src-all@FreeBSD.ORG Tue Dec 18 12:36:18 2012 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id EC1E0C2E for ; Tue, 18 Dec 2012 12:36:18 +0000 (UTC) (envelope-from andre@freebsd.org) Received: from c00l3r.networx.ch (c00l3r.networx.ch [62.48.2.2]) by mx1.freebsd.org (Postfix) with ESMTP id 4E2508FC15 for ; Tue, 18 Dec 2012 12:36:18 +0000 (UTC) Received: (qmail 23563 invoked from network); 18 Dec 2012 14:04:07 -0000 Received: from c00l3r.networx.ch (HELO [127.0.0.1]) ([62.48.2.2]) (envelope-sender ) by c00l3r.networx.ch (qmail-ldap-1.03) with SMTP for ; 18 Dec 2012 14:04:07 -0000 Message-ID: <50D06340.5020904@freebsd.org> Date: Tue, 18 Dec 2012 13:36:16 +0100 From: Andre Oppermann User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:16.0) Gecko/20121026 Thunderbird/16.0.2 MIME-Version: 1.0 To: Andriy Gapon Subject: Re: svn commit: r244112 - head/sys/kern References: <201212110708.qBB78EWx025288@svn.freebsd.org> <50CBC285.7060307@mu.org> <20121215161414.V1029@besplex.bde.org> <201212171439.27297.jhb@freebsd.org> <50CF8CE7.4020906@mu.org> <50CF92F0.5020904@FreeBSD.org> <50CF98DB.1050102@FreeBSD.org> In-Reply-To: <50CF98DB.1050102@FreeBSD.org> Content-Type: text/plain; charset=windows-1251; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, Adrian Chadd , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Dec 2012 12:36:19 -0000 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