Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 6 Jun 2002 12:04:38 -0700 (PDT)
From:      John Baldwin <jhb@FreeBSD.org>
To:        cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   cvs commit: src/sys/kern subr_witness.c
Message-ID:  <200206061904.g56J4cw03179@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
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.
  
  Revision  Changes    Path
  1.117     +11 -13    src/sys/kern/subr_witness.c

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?200206061904.g56J4cw03179>