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
F136987800: D22452.id64921.diff
Thu, Nov 20, 10:25 PM
F136985745: D22452.id64598.diff
Thu, Nov 20, 10:16 PM
F136985665: D22452.id64873.diff
Thu, Nov 20, 10:16 PM
F136985578: D22452.id.diff
Thu, Nov 20, 10:15 PM
F136983848: D22452.diff
Thu, Nov 20, 10:07 PM
Unknown Object (File)
Tue, Nov 11, 2:11 AM
Unknown Object (File)
Mon, Nov 10, 2:12 PM
Unknown Object (File)
Sun, Nov 9, 5:33 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.