From owner-cvs-all Mon Dec 11 18:44:24 2000 From owner-cvs-all@FreeBSD.ORG Mon Dec 11 18:44:20 2000 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from pike.osd.bsdi.com (pike.osd.bsdi.com [204.216.28.222]) by hub.freebsd.org (Postfix) with ESMTP id 5EB0337B400; Mon, 11 Dec 2000 18:44:20 -0800 (PST) Received: from laptop.baldwin.cx (john@jhb-laptop.osd.bsdi.com [204.216.28.241]) by pike.osd.bsdi.com (8.11.1/8.9.3) with ESMTP id eBC2iCE68288; Mon, 11 Dec 2000 18:44:12 -0800 (PST) (envelope-from jhb@FreeBSD.org) Message-ID: X-Mailer: XFMail 1.4.0 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: <20001211172048.R16205@fw.wintelcom.net> Date: Mon, 11 Dec 2000 18:44:18 -0800 (PST) From: John Baldwin To: Alfred Perlstein Subject: Re: cvs commit: src/sys/conf files src/sys/sys mutex.h src/sys/k Cc: cvs-all@FreeBSD.org, cvs-committers@FreeBSD.org, Jake Burkholder Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On 12-Dec-00 Alfred Perlstein wrote: > * Jake Burkholder [001211 17:14] wrote: >> jake 2000/12/11 17:14:33 PST >> >> Modified files: >> sys/conf files >> sys/sys mutex.h >> sys/kern kern_mutex.c >> sys/i386/i386 trap.c >> sys/ia64/ia64 trap.c >> sys/alpha/alpha trap.c >> Log: >> - Add code to detect if a system call returns with locks other than Giant >> held and panic if so (conditional on witness). > > Why not conditional on INVARIANTS? Couldn't this be easily tracked via > a counter in the proc struct? > > I'm trying to find a middle ground where the debug code doesn't make > development unbearable because of the slowdown. MUTEX_DEBUG and WITNESS > make compiling kernels (actually IO) too slow to be tolerated. WITNESS doesn't depend on MUTEX_DEBUG anymore. *bonk* Read your commit mail. :) The function he calls #ifdef WITNESS is only actually defined if WITNESS is compiled in. And if you have that, you already want debugging code, so WITNESS is a better check there than INAVARIANTS. The mtx_assert()'s _are_ conditionalized on INVARIANTS. -- John Baldwin -- http://www.FreeBSD.org/~jhb/ PGP Key: http://www.baldwin.cx/~john/pgpkey.asc "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message