Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 04 Apr 2002 16:15:21 -0500 (EST)
From:      John Baldwin <jhb@FreeBSD.org>
To:        John Baldwin <jhb@FreeBSD.org>
Cc:        cvs-all@FreeBSD.org, cvs-committers@FreeBSD.org
Subject:   RE: cvs commit: src/sys/alpha/alpha busdma_machdep.c interrupt.c
Message-ID:  <XFMail.20020404161521.jhb@FreeBSD.org>
In-Reply-To: <200204042103.g34L3da48233@freefall.freebsd.org>

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

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 <jhb@FreeBSD.org>  <><  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




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