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)
Mar 2 2024, 5:21 AM
Unknown Object (File)
Feb 13 2024, 11:56 AM
Unknown Object (File)
Dec 20 2023, 3:02 AM
Unknown Object (File)
Dec 1 2023, 8:03 PM
Unknown Object (File)
Nov 13 2023, 5:09 AM
Unknown Object (File)
Nov 12 2023, 5:05 PM
Unknown Object (File)
Nov 9 2023, 3:33 AM
Unknown Object (File)
Nov 4 2023, 1:58 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

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

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 ↗(On Diff #64598)

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.