Page MenuHomeFreeBSD

vm_page_xbusy_claim(): Use atomics to update busy lock state.
AbandonedPublic

Authored by markj on Tue, Jul 28, 3:08 PM.

Details

Reviewers
None
Summary

vm_page_xbusy_claim() could clobber the waiter bit. For its original
use, kernel memory pages, this was not a problem since nothing would
ever block on the busy lock for such pages. r363607 introduced a new
use where this could in principle be a problem.

Fix the problem by using atomic_cmpset. Since this macro is defined
only for INVARIANTS kernels, the extra overhead doesn't seem
prohibitive.

Reported by: vangyzen

Diff Detail

Lint
Lint OK
Unit
No Unit Test Coverage
Build Status
Buildable 32615
Build 30071: arc lint + arc unit

Event Timeline

markj requested review of this revision.Tue, Jul 28, 3:08 PM
markj created this revision.
markj abandoned this revision.Tue, Jul 28, 3:08 PM