Switching from a global hash table to per-vm_object radix tries for mapping
vm_object page indices to on-disk swap space (r322913) has changed the synchronization requirements for a couple swap pager functions. Whereas before a read lock on the vm object sufficed because of the global mutex on the hash table, a write lock on the vm object may now be required. In particular, calls to vm_pager_page_unswapped() now require a write lock on the vm_object. Consequently, vm_fault()'s fast path cannot call vm_pager_page_unswapped(). The swap space will have to be released at a later point. Reviewed by: kib, markj X-MFC with: r322913 Differential Revision: https://reviews.freebsd.org/D12134
This commit is contained in:
parent
f7ca2bbe44
commit
d5efa0a475
@ -236,14 +236,15 @@ vm_fault_dirty(vm_map_entry_t entry, vm_page_t m, vm_prot_t prot,
|
||||
* written NOW so dirty it explicitly to save on
|
||||
* pmap_is_modified() calls later.
|
||||
*
|
||||
* Also tell the backing pager, if any, that it should remove
|
||||
* any swap backing since the page is now dirty.
|
||||
* Also, since the page is now dirty, we can possibly tell
|
||||
* the pager to release any swap backing the page. Calling
|
||||
* the pager requires a write lock on the object.
|
||||
*/
|
||||
if (need_dirty)
|
||||
vm_page_dirty(m);
|
||||
if (!set_wd)
|
||||
vm_page_unlock(m);
|
||||
if (need_dirty)
|
||||
else if (need_dirty)
|
||||
vm_pager_page_unswapped(m);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user