From owner-freebsd-smp Sat Mar 13 1:35:13 1999 Delivered-To: freebsd-smp@freebsd.org Received: from iquest3.iquest.net (iquest3.iquest.net [209.43.20.203]) by hub.freebsd.org (Postfix) with SMTP id 940D014E62 for ; Sat, 13 Mar 1999 01:35:11 -0800 (PST) (envelope-from toor@y.dyson.net) Received: (qmail 7274 invoked from network); 13 Mar 1999 09:34:51 -0000 Received: from dyson.iquest.net (HELO y.dyson.net) (198.70.144.127) by iquest3.iquest.net with SMTP; 13 Mar 1999 09:34:51 -0000 Received: (from toor@localhost) by y.dyson.net (8.9.3/8.9.1) id EAA01281; Sat, 13 Mar 1999 04:34:45 -0500 (EST) Message-Id: <199903130934.EAA01281@y.dyson.net> Subject: Re: lockmgr() panic In-Reply-To: <199903101910.MAA09630@panzer.plutotech.com> from "Kenneth D. Merry" at "Mar 10, 99 12:10:45 pm" To: ken@plutotech.com (Kenneth D. Merry) Date: Sat, 13 Mar 1999 04:34:45 -0500 (EST) Cc: dillon@apollo.backplane.com, Thierry.Besancon@lps.ens.fr, luoqi@watermarkgroup.com, Thierry.Besancon@tournesol.lps.ens.fr, dwhite@gdi.uoregon.edu, freebsd-smp@FreeBSD.ORG, Pierre.David@prism.uvsq.fr, alc@cs.rice.edu, jt@ratp.fr From: "John S. Dyson" Reply-To: dyson@iquest.net X-Mailer: ELM [version 2.4ME+ PL38 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-smp@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Kenneth D. Merry said: > > I think that's one of those "John-Dyson-only" options. > It was mostly for investigating the cost of consistancy checks. If the cost is insignificant, then remove the #ifdef, and enable the code all of the time. Note that adding lots of cruft with wordy asserts adds to bloat. On X86 machines, registers are expensive, and subroutine calls really mess things up. IMO, you cannot check everything every time. Sometimes, I added asserts that were silly, and they should be carefully placed, and not put willy-nilly all over the code. Lots of asserts make code almost as unreadable as lots of '#ifdefs' and silly macros. Not only that, lots of asserts unconditionally enabled that don't diagnose a carefully considered error syndrome just take up memory unnecessarily, and often don't really help debugging. Being able to remove asserts and debugging stuff (like DIAGNOSTIC) increases flexibility. Like any option, making silly decisions makes silly results. -- John | Never try to teach a pig to sing, dyson@iquest.net | it makes one look stupid jdyson@nc.com | and it irritates the pig. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-smp" in the body of the message