From owner-cvs-all Thu Apr 4 13:15:37 2002 Delivered-To: cvs-all@freebsd.org Received: from mail12.speakeasy.net (mail12.speakeasy.net [216.254.0.212]) by hub.freebsd.org (Postfix) with ESMTP id 9CFB137B427 for ; Thu, 4 Apr 2002 13:15:27 -0800 (PST) Received: (qmail 5057 invoked from network); 4 Apr 2002 21:15:25 -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 ; 4 Apr 2002 21:15:25 -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 g34LG5v29120; Thu, 4 Apr 2002 16:16:05 -0500 (EST) (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: <200204042103.g34L3da48233@freefall.freebsd.org> Date: Thu, 04 Apr 2002 16:15:21 -0500 (EST) From: John Baldwin To: John Baldwin Subject: RE: cvs commit: src/sys/alpha/alpha busdma_machdep.c interrupt.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 04-Apr-2002 John Baldwin wrote: > jhb 2002/04/04 13:03:39 PST > > Log: > Change callers of mtx_init() to pass in an appropriate lock type name. In > most cases NULL is passed, but in some cases such as network driver locks > (which use the MTX_NETWORK_LOCK macro) and UMA zone locks, a name is used. > > Tested on: i386, alpha, sparc64 This should fix the witness_get: witness_exhausted warning some people have reported since UMA went in. Some of the cases like the sound locks and network driver locks are old bugs that needed to be fixed but this just hadn't been done yet. Basically, from a lock order perspective all network driver locks (for example) are the same and we should enforce the same locking order for all network driver locks. Similarly, the locks on every PCM channel should be treated the same, as well as the lock for each UMA zone, etc. I think this reintroduces a new warning about one of the UMA zone's being acquired as a duplicate now but that can be worked around however the UMA maintainer sees fit either by pushing the description into the ZONE_LOCK_INIT() macro or by just using mtx_init() manually for the kernel map zone. Finally, I realize this bloats lock_object. Ideally, non-debug kernels shouldn't even have lock_object or lock_classes at all. The only complication is if you want a module that will work with every conceivable kernel config. -- 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