From owner-cvs-all Thu Jun 6 12:10:28 2002 Delivered-To: cvs-all@freebsd.org Received: from mail.speakeasy.net (mail12.speakeasy.net [216.254.0.212]) by hub.freebsd.org (Postfix) with ESMTP id 44D3B37B417 for ; Thu, 6 Jun 2002 12:10:11 -0700 (PDT) Received: (qmail 26618 invoked from network); 6 Jun 2002 19:10:09 -0000 Received: from unknown (HELO server.baldwin.cx) ([216.27.160.63]) (envelope-sender ) by mail12.speakeasy.net (qmail-ldap-1.03) with DES-CBC3-SHA encrypted SMTP for ; 6 Jun 2002 19:10:09 -0000 Received: from laptop.baldwin.cx (gw1.twc.weather.com [216.133.140.1]) by server.baldwin.cx (8.11.6/8.11.6) with ESMTP id g56JA8F62208; Thu, 6 Jun 2002 15:10:08 -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: <200206061904.g56J4cw03179@freefall.freebsd.org> Date: Thu, 06 Jun 2002 15:10:02 -0400 (EDT) From: John Baldwin To: John Baldwin Subject: RE: cvs commit: src/sys/kern subr_witness.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 06-Jun-2002 John Baldwin wrote: > jhb 2002/06/06 12:04:38 PDT > > Modified files: > sys/kern subr_witness.c > Log: > Handle "dead" witnesses better in the situation of several short term locks > being created and destroyed without a single long-term one around to ensure > the witness associated with that group of locks stays alive. The pipe > mutexes are an example of this group. For a dead witness we no longer > clear the witness name. Instead, when looking up the witness for a lock, > if a dead witness' (a witness with a refcount of 0) w_name pointer is > identical to the witness name of the lock then we revive that witness > instead of using a new witness for the lock. This results in far fewer > dead witness objects and also better preserves locking orders over the long > term resulting in more correct lock order checking. Note that we can't > ever derefence w_name of a dead witness since we don't know if the string > it is pointing to has been free()'d or kldunload()'d out from under us. This should at least help if not fully address the witness_get: exhausted problems reported by Kris, Hiten, and others. If the folks having this problem could test witness out with this patch and let me know if it does better, I would appreciate it. -- 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