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
Unknown Object (File)
Fri, Jan 17, 2:16 PM
Unknown Object (File)
Wed, Jan 15, 1:20 PM
Unknown Object (File)
Sat, Dec 28, 10:13 AM
Unknown Object (File)
Nov 15 2024, 11:42 PM
Unknown Object (File)
Nov 13 2024, 11:11 AM
Unknown Object (File)
Nov 7 2024, 4:49 AM
Unknown Object (File)
Nov 5 2024, 5:57 PM
Unknown Object (File)
Oct 27 2024, 2:35 AM
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.