From owner-cvs-all Mon Sep 9 8:10:42 2002 Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E6A7A37B408 for ; Mon, 9 Sep 2002 08:10:15 -0700 (PDT) Received: from mail.speakeasy.net (mail13.speakeasy.net [216.254.0.213]) by mx1.FreeBSD.org (Postfix) with ESMTP id E1DFD43E6A for ; Mon, 9 Sep 2002 08:10:14 -0700 (PDT) (envelope-from jhb@FreeBSD.org) Received: (qmail 9095 invoked from network); 9 Sep 2002 15:10:13 -0000 Received: from unknown (HELO server.baldwin.cx) ([216.27.160.63]) (envelope-sender ) by mail13.speakeasy.net (qmail-ldap-1.03) with DES-CBC3-SHA encrypted SMTP for ; 9 Sep 2002 15:10:13 -0000 Received: from laptop.baldwin.cx (gw1.twc.weather.com [216.133.140.1]) by server.baldwin.cx (8.12.5/8.12.5) with ESMTP id g89FACBv027333; Mon, 9 Sep 2002 11:10:12 -0400 (EDT) (envelope-from jhb@FreeBSD.org) Message-ID: X-Mailer: XFMail 1.5.2 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: <20020908044114.GF12935@wantadilla.lemis.com> Date: Mon, 09 Sep 2002 11:10:13 -0400 (EDT) From: John Baldwin To: "Greg 'groggy' Lehey" Subject: Re: cvs commit: src/sys/kern kern_mutex.c Cc: cvs-all@FreeBSD.org, cvs-committers@FreeBSD.org Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On 08-Sep-2002 Greg 'groggy' Lehey wrote: > On Tuesday, 3 September 2002 at 11:25:16 -0700, John Baldwin wrote: >> jhb 2002/09/03 11:25:16 PDT >> >> Modified files: >> sys/kern kern_mutex.c >> Log: >> Add some KASSERT()'s to ensure that we don't perform spin mutex ops on >> sleep mutexes and vice versa. WITNESS normally should catch this but >> not everyone uses WITNESS so this is a fallback to catch nasty but easy >> to do bugs. > > Is this a temporary thing which will go away, or is it dependent on > some other debugging option? It doesn't seem to be something that > should remain in production systems for ever. Hmm, well, for developer's it is very useful. WITNESS unfortunately doesn't seem to catch the cases when it happens (I think the damage is usually done too late by that point). ATM it is just a simple == comparison with perhaps two pointer dereferences, not really a very expensive check. -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "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