Eliminate (now) unnecessary acquisition and release of the global page
queues lock in vm_object_backing_scan(). Updates to the page's PG_BUSY flag and busy field are synchronized by the containing object's lock. Testing the page's hold_count and wire_count in vm_object_backing_scan()'s OBSC_COLLAPSE_NOWAIT case is unnecessary. There is no reason why the held or wired pages cannot be migrated to the shadow object. Reviewed by: tegge
This commit is contained in:
parent
24f6f05d8e
commit
f96df99a75
@ -1431,19 +1431,16 @@ vm_object_backing_scan(vm_object_t object, int op)
|
||||
if (op & (OBSC_COLLAPSE_WAIT | OBSC_COLLAPSE_NOWAIT)) {
|
||||
vm_page_t pp;
|
||||
|
||||
vm_page_lock_queues();
|
||||
if (op & OBSC_COLLAPSE_NOWAIT) {
|
||||
if ((p->flags & PG_BUSY) ||
|
||||
!p->valid ||
|
||||
p->hold_count ||
|
||||
p->wire_count ||
|
||||
p->busy) {
|
||||
vm_page_unlock_queues();
|
||||
p = next;
|
||||
continue;
|
||||
}
|
||||
} else if (op & OBSC_COLLAPSE_WAIT) {
|
||||
if ((p->flags & PG_BUSY) || p->busy) {
|
||||
vm_page_lock_queues();
|
||||
vm_page_flag_set(p,
|
||||
PG_WANTED | PG_REFERENCED);
|
||||
VM_OBJECT_UNLOCK(backing_object);
|
||||
@ -1463,7 +1460,6 @@ vm_object_backing_scan(vm_object_t object, int op)
|
||||
continue;
|
||||
}
|
||||
}
|
||||
vm_page_unlock_queues();
|
||||
|
||||
KASSERT(
|
||||
p->object == backing_object,
|
||||
|
Loading…
Reference in New Issue
Block a user