Page MenuHomeFreeBSD

Fix object unlocking in vm_object_unwire() after r352174.
ClosedPublic

Authored by markj on Sep 25 2019, 4:15 PM.
Tags
None
Referenced Files
F139513651: D21790.id62654.diff
Fri, Dec 12, 10:52 PM
Unknown Object (File)
Thu, Nov 20, 8:41 PM
Unknown Object (File)
Thu, Nov 20, 8:38 PM
Unknown Object (File)
Thu, Nov 20, 8:37 PM
Unknown Object (File)
Thu, Nov 20, 8:32 PM
Unknown Object (File)
Wed, Nov 19, 5:38 AM
Unknown Object (File)
Mon, Nov 17, 3:00 AM
Unknown Object (File)
Mon, Nov 17, 1:19 AM
Subscribers

Details

Summary

Now, vm_page_busy_sleep() expects the page's object to be locked.
vm_object_unwire() does some unusual lazy locking of the object chain,
and keeps objects locked until a busy page is encountered or the loop
terminates. When a busy page is encountered, rather than unlocking all
but the "bottom-level" object, we must instead skip the object to which
tm belongs.

To provide a concrete example, suppose we are asked to unwire pages
in the range [0, 1] from object O, with backing object BO with offset 0.
Suppose no page is resident at 0 in O, but an xbusy page is resident at 1
in O. BO must contain a page at 0. vm_object_unwire() will lock
both O and BO to unwire the page at 0. It would then encounter the
busy page at 1 in O, and it must unlock BO, not O, before sleeping on
the page's busy state.

Test Plan

Peter reported the bug and is testing the diff.

Diff Detail

Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 26692
Build 25056: arc lint + arc unit