Page MenuHomeFreeBSD

Synchronize page laundering with pmap_extract_and_hold()
ClosedPublic

Authored by markj on Aug 19 2017, 9:33 PM.
Tags
None
Referenced Files
F137087030: D12084.id32460.diff
Fri, Nov 21, 3:00 AM
F137086833: D12084.id.diff
Fri, Nov 21, 2:59 AM
F137085804: D12084.id32256.diff
Fri, Nov 21, 2:57 AM
F137085289: D12084.diff
Fri, Nov 21, 2:56 AM
Unknown Object (File)
Mon, Nov 17, 3:03 AM
Unknown Object (File)
Sat, Nov 8, 2:35 AM
Unknown Object (File)
Wed, Nov 5, 1:33 AM
Unknown Object (File)
Mon, Nov 3, 9:16 PM
Subscribers
None

Details

Summary

The hold_count check in vm_pageout_cluster() is susceptible to a race
with pmap_extract_and_hold() since the latter may be called without the
object lock or vnode lock held. In particular, there is a window between
the hold_count check and the later pmap_remove_write() call during which
a concurrent pmap_extract_and_hold() caller may obtain write access to
pages in the cluster. This appears to be a regression from r207410.

Attempt to handle this by atomically checking hold_count and removing
managed write mappings when adding a page to a pageout cluster. Note
that vm_object_page_collect_flush() ensures that the clustered pages
are read-only.

Diff Detail

Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 11172
Build 11553: arc lint + arc unit