Page MenuHomeFreeBSD

Use a reader count instead of holding lock.
ClosedPublic

Authored by sson on Mar 24 2015, 4:11 AM.
Tags
None
Referenced Files
F175591556: D2123.id.diff
Sun, Oct 11, 9:42 PM
F175572548: D2123.diff
Sun, Oct 11, 7:03 PM
Unknown Object (File)
Sat, Sep 19, 10:34 PM
Unknown Object (File)
Sat, Sep 19, 8:19 PM
Unknown Object (File)
Sat, Sep 12, 4:00 AM
Unknown Object (File)
Sep 12 2026, 2:18 AM
Unknown Object (File)
Sep 10 2026, 9:46 PM
Unknown Object (File)
Sep 10 2026, 4:38 AM
Subscribers
None

Details

Reviewers
sbruno
Summary
This change uses a reader count instead of holding the mutex for the
interpreter list to avoid the problem of holding a non-sleep lock during
a page fault as reported by witness.  In addition, it consistently uses
memset()/memcpy() instead of bzero()/bcopy() except in the case where
bcopy() is required (i.e. overlapping copy).

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

sson retitled this revision from to Use a reader count instead of holding lock..
sson updated this object.
sson edited the test plan for this revision. (Show Details)
sbruno edited edge metadata.

Tested on head with WITNESS/INVARIANTS and all options in GENERIC. This resolves the witness enabled panic on HEAD.

This revision is now accepted and ready to land.Jun 4 2015, 8:43 PM

This was reverted after review. Will go back to D1971 as per suggestions to really try to use an sx_lock