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
F137230331: D2713.id5893.diff
Fri, Nov 21, 3:43 PM
Unknown Object (File)
Mon, Nov 17, 4:11 PM
Unknown Object (File)
Sat, Nov 8, 12:44 AM
Unknown Object (File)
Tue, Nov 4, 6:17 AM
Unknown Object (File)
Tue, Nov 4, 6:17 AM
Unknown Object (File)
Tue, Nov 4, 6:17 AM
Unknown Object (File)
Tue, Nov 4, 2:38 AM
Unknown Object (File)
Sun, Oct 26, 12:58 AM
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.