cvs commit: src/sys/kern subr_witness.c

Attilio Rao attilio at FreeBSD.org
Fri Sep 12 21:44:47 UTC 2008


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


More information about the cvs-src mailing list