Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 06 Jun 2002 15:10:02 -0400 (EDT)
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/kern subr_witness.c
Message-ID:  <XFMail.20020606151002.jhb@FreeBSD.org>
In-Reply-To: <200206061904.g56J4cw03179@freefall.freebsd.org>

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

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 <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.20020606151002.jhb>