Page MenuHomeFreeBSD

Use atomics for object reference count so that we can use the shared lock to protect it.
Needs ReviewPublic

Authored by jeff on Tue, Sep 10, 8:34 PM.

Details

Reviewers
alc
kib
markj
dougm
Summary

This allows for shared locks in some cases where we are manipulating the object reference count.

It would be possible for non-vnode objects to actually atomically drop the reference count with no lock held as long as it is above 2. Callers that expect stable reference counts with the write lock held only require it stay stable below 2. The relationship between the object and vnode reference counts make this much more complex for vnodes. I would like to refactor this so we only bump the vnode ref for the first object ref but it requires other changes to vfs.

Diff Detail

Lint
Lint OK
Unit
No Unit Test Coverage
Build Status
Buildable 26395
Build 24852: arc lint + arc unit

Event Timeline

jeff created this revision.Tue, Sep 10, 8:34 PM
jeff edited the summary of this revision. (Show Details)Tue, Sep 10, 8:40 PM
jeff added reviewers: alc, kib, markj, dougm.