Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 11 Dec 2000 18:44:18 -0800 (PST)
From:      John Baldwin <jhb@FreeBSD.org>
To:        Alfred Perlstein <bright@wintelcom.net>
Cc:        cvs-all@FreeBSD.org, cvs-committers@FreeBSD.org, Jake Burkholder <jake@FreeBSD.org>
Subject:   Re: cvs commit: src/sys/conf files src/sys/sys mutex.h src/sys/k
Message-ID:  <XFMail.001211184418.jhb@FreeBSD.org>
In-Reply-To: <20001211172048.R16205@fw.wintelcom.net>

next in thread | previous in thread | raw e-mail | index | archive | help

On 12-Dec-00 Alfred Perlstein wrote:
> * Jake Burkholder <jake@FreeBSD.org> [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 <jhb@FreeBSD.org> -- 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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?XFMail.001211184418.jhb>