mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-06 13:09:50 +00:00
The page queues lock is no longer required by vm_page_busy() or
vm_page_wakeup(). Reduce or eliminate its use accordingly.
This commit is contained in:
parent
b39be1b35c
commit
2a53696fb8
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=163614
@ -529,17 +529,13 @@ agp_generic_bind_memory(device_t dev, struct agp_memory *mem,
|
||||
* Bail out. Reverse all the mappings
|
||||
* and unwire the pages.
|
||||
*/
|
||||
vm_page_lock_queues();
|
||||
vm_page_wakeup(m);
|
||||
vm_page_unlock_queues();
|
||||
for (k = 0; k < i + j; k += AGP_PAGE_SIZE)
|
||||
AGP_UNBIND_PAGE(dev, offset + k);
|
||||
goto bad;
|
||||
}
|
||||
}
|
||||
vm_page_lock_queues();
|
||||
vm_page_wakeup(m);
|
||||
vm_page_unlock_queues();
|
||||
}
|
||||
VM_OBJECT_UNLOCK(mem->am_obj);
|
||||
|
||||
|
@ -829,9 +829,7 @@ exec_map_first_page(imgp)
|
||||
break;
|
||||
if ((ma[i]->oflags & VPO_BUSY) || ma[i]->busy)
|
||||
break;
|
||||
vm_page_lock_queues();
|
||||
vm_page_busy(ma[i]);
|
||||
vm_page_unlock_queues();
|
||||
} else {
|
||||
ma[i] = vm_page_alloc(object, i,
|
||||
VM_ALLOC_NORMAL);
|
||||
@ -855,8 +853,8 @@ exec_map_first_page(imgp)
|
||||
}
|
||||
vm_page_lock_queues();
|
||||
vm_page_hold(ma[0]);
|
||||
vm_page_wakeup(ma[0]);
|
||||
vm_page_unlock_queues();
|
||||
vm_page_wakeup(ma[0]);
|
||||
VM_OBJECT_UNLOCK(object);
|
||||
|
||||
imgp->firstpage = sf_buf_alloc(ma[0], 0);
|
||||
|
@ -529,17 +529,13 @@ agp_generic_bind_memory(device_t dev, struct agp_memory *mem,
|
||||
* Bail out. Reverse all the mappings
|
||||
* and unwire the pages.
|
||||
*/
|
||||
vm_page_lock_queues();
|
||||
vm_page_wakeup(m);
|
||||
vm_page_unlock_queues();
|
||||
for (k = 0; k < i + j; k += AGP_PAGE_SIZE)
|
||||
AGP_UNBIND_PAGE(dev, offset + k);
|
||||
goto bad;
|
||||
}
|
||||
}
|
||||
vm_page_lock_queues();
|
||||
vm_page_wakeup(m);
|
||||
vm_page_unlock_queues();
|
||||
}
|
||||
VM_OBJECT_UNLOCK(mem->am_obj);
|
||||
|
||||
|
@ -1364,10 +1364,8 @@ vm_object_split(vm_map_entry_t entry)
|
||||
swap_pager_copy(orig_object, new_object, offidxstart, 0);
|
||||
}
|
||||
VM_OBJECT_UNLOCK(orig_object);
|
||||
vm_page_lock_queues();
|
||||
TAILQ_FOREACH(m, &new_object->memq, listq)
|
||||
vm_page_wakeup(m);
|
||||
vm_page_unlock_queues();
|
||||
VM_OBJECT_UNLOCK(new_object);
|
||||
entry->object.vm_object = new_object;
|
||||
entry->offset = 0LL;
|
||||
|
@ -1472,12 +1472,13 @@ vm_page_grab(vm_object_t object, vm_pindex_t pindex, int allocflags)
|
||||
return (NULL);
|
||||
goto retrylookup;
|
||||
} else {
|
||||
vm_page_lock_queues();
|
||||
if (allocflags & VM_ALLOC_WIRED)
|
||||
if ((allocflags & VM_ALLOC_WIRED) != 0) {
|
||||
vm_page_lock_queues();
|
||||
vm_page_wire(m);
|
||||
vm_page_unlock_queues();
|
||||
}
|
||||
if ((allocflags & VM_ALLOC_NOBUSY) == 0)
|
||||
vm_page_busy(m);
|
||||
vm_page_unlock_queues();
|
||||
return (m);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user