Page MenuHomeFreeBSD

Handle most object reference count updates without object locks.
ClosedPublic

Authored by jeff on Nov 20 2019, 12:32 AM.
Tags
None
Referenced Files
F149711243: D22452.id.diff
Thu, Mar 26, 10:22 AM
Unknown Object (File)
Thu, Mar 26, 3:14 AM
Unknown Object (File)
Sun, Mar 22, 5:38 PM
Unknown Object (File)
Fri, Mar 20, 5:49 PM
Unknown Object (File)
Thu, Mar 19, 11:34 PM
Unknown Object (File)
Tue, Mar 17, 6:21 AM
Unknown Object (File)
Tue, Mar 17, 3:23 AM
Unknown Object (File)
Fri, Mar 13, 2:26 PM
Subscribers

Details

Summary

This patch moves to only requiring the object lock on the last ref (or second to last for anonymous objects) as well as the first ref of a vnode object.

The object lock wouldn't be required for the first vnode ref except to serialize with vnode_pager_dealloc() which could race and drop a vref that is not yet acquired. I'm not sure if this is even possible anymore and if it is not vm_object_reference() could be simplified.

Diff Detail

Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 27770
Build 25959: arc lint + arc unit

Event Timeline

jeff retitled this revision from Experimental object reference changes to Handle most object reference count updates without object locks..Nov 20 2019, 12:40 AM
jeff edited the summary of this revision. (Show Details)
jeff added reviewers: kib, markj, alc, dougm.
jeff set the repository for this revision to rS FreeBSD src repository - subversion.
sys/vm/vnode_pager.c
176

s/thee/the/

Fix a race between unlocked reference and collapse.

This now passes various stress tests and I believe it is suitable to go in. The reduction in locking of the vnode object is substantial.

This revision was not accepted when it landed; it landed in state Needs Review.Nov 27 2019, 12:39 AM
This revision was automatically updated to reflect the committed changes.