mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-07 13:14:51 +00:00
Revert the addition of VPO_BUSY and instead update vm_page_replace() to
properly unbusy the page. Submitted by: alc
This commit is contained in:
parent
8030839bd2
commit
cdc00bf7d2
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=254163
@ -1174,6 +1174,8 @@ vm_page_prev(vm_page_t m)
|
||||
/*
|
||||
* Uses the page mnew as a replacement for an existing page at index
|
||||
* pindex which must be already present in the object.
|
||||
*
|
||||
* The existing page must not be on a paging queue.
|
||||
*/
|
||||
vm_page_t
|
||||
vm_page_replace(vm_page_t mnew, vm_object_t object, vm_pindex_t pindex)
|
||||
@ -1198,16 +1200,14 @@ vm_page_replace(vm_page_t mnew, vm_object_t object, vm_pindex_t pindex)
|
||||
mnew->object = object;
|
||||
mnew->pindex = pindex;
|
||||
mold = vm_radix_replace(&object->rtree, mnew, pindex);
|
||||
KASSERT(mold->queue == PQ_NONE,
|
||||
("vm_page_replace: mold is on a paging queue"));
|
||||
|
||||
/* Detach the old page from the resident tailq. */
|
||||
TAILQ_REMOVE(&object->memq, mold, listq);
|
||||
vm_page_lock(mold);
|
||||
if (mold->oflags & VPO_BUSY) {
|
||||
mold->oflags &= ~VPO_BUSY;
|
||||
vm_page_flash(mold);
|
||||
}
|
||||
|
||||
mold->object = NULL;
|
||||
vm_page_unlock(mold);
|
||||
vm_page_xunbusy(mold);
|
||||
|
||||
/* Insert the new page in the resident tailq. */
|
||||
if (mpred != NULL)
|
||||
|
@ -171,7 +171,6 @@ struct vm_page {
|
||||
#define VPO_UNMANAGED 0x04 /* no PV management for page */
|
||||
#define VPO_SWAPINPROG 0x08 /* swap I/O in progress on page */
|
||||
#define VPO_NOSYNC 0x10 /* do not collect for syncer */
|
||||
#define VPO_BUSY 0x20 /* TBD */
|
||||
|
||||
/*
|
||||
* Busy page implementation details.
|
||||
|
Loading…
Reference in New Issue
Block a user