HomeFreeBSD

#108317: 1. use per-chain mutex instead of global mutex to reduce
77df05d6174aUnpublished

Unpublished Commit ยท Learn More

  • Repository Importing: This repository is still importing.
  • Not On Permanent Ref: This commit is not an ancestor of any permanent ref.
This commit no longer exists in the repository. It may have been part of a branch which was deleted.

Description

#108317: 1. use per-chain mutex instead of global mutex to reduce

lock collision.
  1. Fix two race conditions. One is between _umtx_unlock and signal, also a thread was marked TDF_UMTXWAKEUP by _umtx_unlock, it is possible a signal delivered to the thread will cause msleep returns EINTR, and the thread breaks out of loop, this causes umtx ownership is not transfered to the thread. Another is in _umtx_unlock itself, when the function sets the umtx to UMTX_UNOWNED state, a new thread can come in and lock the umtx, also the function tries to set contested bit flag, but it will fail. Although the function will wake a blocked thread, if that thread breaks out of loop by signal, no contested bit will be set.

Details

Provenance
David Xu <davidxu@FreeBSD.org>Authored on Nov 30 2004, 12:02 PM

Event Timeline

Commit No Longer Exists

This commit no longer exists in the repository.