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
F147312874: D12084.id32460.diff
Mon, Mar 9, 9:27 PM
F147269300: D12084.diff
Mon, Mar 9, 2:13 PM
F147266423: D12084.diff
Mon, Mar 9, 1:43 PM
Unknown Object (File)
Sun, Mar 8, 9:28 PM
Unknown Object (File)
Mon, Mar 2, 1:49 PM
Unknown Object (File)
Mon, Mar 2, 4:40 AM
Unknown Object (File)
Fri, Feb 27, 1:34 AM
Unknown Object (File)
Thu, Feb 26, 7:09 AM
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

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable