Page MenuHomeFreeBSD

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

Authored by markj on Jul 28 2020, 3:08 PM.
Tags
None
Referenced Files
Unknown Object (File)
Jan 11 2024, 9:46 AM
Unknown Object (File)
Dec 13 2023, 3:17 AM
Unknown Object (File)
Sep 24 2023, 9:28 AM
Unknown Object (File)
Sep 1 2023, 1:45 AM
Unknown Object (File)
Aug 4 2023, 9:17 AM
Unknown Object (File)
Jul 31 2023, 4:45 AM
Unknown Object (File)
Jul 11 2023, 1:51 AM
Unknown Object (File)
Jun 4 2023, 9:31 PM
Subscribers
None

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 Passed
Unit
No Test Coverage
Build Status
Buildable 32615
Build 30071: arc lint + arc unit

Event Timeline

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