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)
Jan 18 2024, 1:16 PM
Unknown Object (File)
Jan 5 2024, 5:42 PM
Unknown Object (File)
Dec 20 2023, 7:56 AM
Unknown Object (File)
Sep 7 2023, 7:49 PM
Unknown Object (File)
Sep 7 2023, 4:12 PM
Unknown Object (File)
Sep 7 2023, 4:12 PM
Unknown Object (File)
Sep 1 2023, 11:44 PM
Unknown Object (File)
Jun 25 2023, 1:41 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.