Page MenuHomeFreeBSD

Don't print warnings about a mismatch if the witness lock isn't held.
ClosedPublic

Authored by markj on Jun 2 2015, 11:32 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Jan 20, 6:26 AM
Unknown Object (File)
Mon, Jan 20, 4:28 AM
Unknown Object (File)
Nov 29 2024, 6:08 PM
Unknown Object (File)
Sep 24 2024, 11:58 AM
Unknown Object (File)
Sep 23 2024, 6:53 AM
Unknown Object (File)
Sep 17 2024, 8:20 PM
Unknown Object (File)
Sep 16 2024, 10:40 PM
Unknown Object (File)
Sep 13 2024, 10:28 PM
Subscribers

Details

Summary

If multiple threads are simultaneously attempting to establish a new
lock order, it's possible that one thread is reading a pair of matrix
entries as another updates them, causing spurious mismatch warnings.

This change modifies isitmyx() to simply return false if a mismatch is
detected when the witness lock isn't held; it is then the caller's
responsibility to handle this possibility. Currently this can only
happen when witness_lock_order_check() is called, in which case we just
redo the lookup after taking the lock.

Test Plan

At $work we were seeing occasional matrix mismatches during boot, but they haven't occurred after this change.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

markj retitled this revision from to Don't print warnings about a mismatch if the witness lock isn't held..
markj edited the test plan for this revision. (Show Details)
markj updated this object.
markj added a reviewer: jhb.
jhb edited edge metadata.
This revision is now accepted and ready to land.Jun 4 2015, 8:19 PM
This revision was automatically updated to reflect the committed changes.