Increase the scope of the page queues lock in phys_pager_getpages().
This commit is contained in:
parent
ce4fd6b4c5
commit
969da54c3a
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=108306
@ -139,17 +139,19 @@ phys_pager_getpages(vm_object_t object, vm_page_t *m, int count, int reqpage)
|
||||
int i, s;
|
||||
|
||||
s = splvm();
|
||||
vm_page_lock_queues();
|
||||
/*
|
||||
* Fill as many pages as vm_fault has allocated for us.
|
||||
*/
|
||||
for (i = 0; i < count; i++) {
|
||||
if ((m[i]->flags & PG_ZERO) == 0)
|
||||
if ((m[i]->flags & PG_ZERO) == 0) {
|
||||
vm_page_unlock_queues();
|
||||
pmap_zero_page(m[i]);
|
||||
/* Switch off pv_entries */
|
||||
vm_page_lock_queues();
|
||||
vm_page_lock_queues();
|
||||
}
|
||||
vm_page_flag_set(m[i], PG_ZERO);
|
||||
/* Switch off pv_entries */
|
||||
vm_page_unmanage(m[i]);
|
||||
vm_page_unlock_queues();
|
||||
m[i]->valid = VM_PAGE_BITS_ALL;
|
||||
m[i]->dirty = 0;
|
||||
/* The requested page must remain busy, the others not. */
|
||||
@ -158,6 +160,7 @@ phys_pager_getpages(vm_object_t object, vm_page_t *m, int count, int reqpage)
|
||||
m[i]->busy = 0;
|
||||
}
|
||||
}
|
||||
vm_page_unlock_queues();
|
||||
splx(s);
|
||||
|
||||
return (VM_PAGER_OK);
|
||||
|
Loading…
Reference in New Issue
Block a user