Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 12 Sep 2008 21:44:01 +0000 (UTC)
From:      Attilio Rao <attilio@FreeBSD.org>
To:        src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   cvs commit: src/sys/kern subr_witness.c
Message-ID:  <200809122144.m8CLiltA098736@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
attilio     2008-09-12 21:44:01 UTC

  FreeBSD src repository

  Modified files:
    sys/kern             subr_witness.c 
  Log:
  SVN rev 182984 on 2008-09-12 21:44:01Z by attilio
  
  - For any lock list we hold the head in order to reduce allocation from
    the free list and in this way avoid contention on the w_mtx.
    In order to make the code simple, we rely on the rule that when the head
    has not a child it also doesn't have other subsequent entries.
    Actually this assertion is broken because we can free all the head
    children and quit witness_unlock() with the head still allocated, with no
    children and subsequent entries present.
    Fix this by shifting the head if other entries are present and still
    freeing the object, but leaving always an head.
  - Fix witness_thread_has_locks() in order to report, correctly, if the
    lock list linked to a specific thread has children or not based on the
    above explained rule.
  - Fix a printout into DDB's "show alllocks" command in order to show,
    correctly, the process name that is really what we want.
  - Fix style(9) for a comment.
  
  Tested by:      Giovanni Trematerra <giovanni dot trematerra at gmail dot com>
  Reported by:    Marko Kiiskila <marko dot kiiskila at nokia dot com>
  Sponsored by:   Nokia
  
  Revision  Changes    Path
  1.255     +18 -5     src/sys/kern/subr_witness.c



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