Changeset View
Changeset View
Standalone View
Standalone View
sys/vm/vm_object.c
Show First 20 Lines • Show All 2,115 Lines • ▼ Show 20 Lines | if ((options & OBJPR_CLEANONLY) != 0 && | ||||
} | } | ||||
} | } | ||||
if ((options & OBJPR_NOTMAPPED) == 0 && | if ((options & OBJPR_NOTMAPPED) == 0 && | ||||
object->ref_count != 0 && !vm_page_try_remove_all(p)) | object->ref_count != 0 && !vm_page_try_remove_all(p)) | ||||
goto wired; | goto wired; | ||||
vm_page_free(p); | vm_page_free(p); | ||||
} | } | ||||
vm_object_pip_wakeup(object); | vm_object_pip_wakeup(object); | ||||
if (object->type == OBJT_SWAP) { | |||||
if (end == 0) | |||||
end = object->size; | |||||
swap_pager_freespace(object, start, end - start); | |||||
} | } | ||||
} | |||||
/* | /* | ||||
* vm_object_page_noreuse: | * vm_object_page_noreuse: | ||||
* | * | ||||
* For the given object, attempt to move the specified pages to | * For the given object, attempt to move the specified pages to | ||||
* the head of the inactive queue. This bypasses regular LRU | * the head of the inactive queue. This bypasses regular LRU | ||||
* operation and allows the pages to be reused quickly under memory | * operation and allows the pages to be reused quickly under memory | ||||
* pressure. If a page is wired for any reason, then it will not | * pressure. If a page is wired for any reason, then it will not | ||||
▲ Show 20 Lines • Show All 150 Lines • ▼ Show 20 Lines | vm_object_coalesce(vm_object_t prev_object, vm_ooffset_t prev_offset, | ||||
/* | /* | ||||
* Remove any pages that may still be in the object from a previous | * Remove any pages that may still be in the object from a previous | ||||
* deallocation. | * deallocation. | ||||
*/ | */ | ||||
if (next_pindex < prev_object->size) { | if (next_pindex < prev_object->size) { | ||||
vm_object_page_remove(prev_object, next_pindex, next_pindex + | vm_object_page_remove(prev_object, next_pindex, next_pindex + | ||||
next_size, 0); | next_size, 0); | ||||
if (prev_object->type == OBJT_SWAP) | |||||
swap_pager_freespace(prev_object, | |||||
next_pindex, next_size); | |||||
#if 0 | #if 0 | ||||
if (prev_object->cred != NULL) { | if (prev_object->cred != NULL) { | ||||
KASSERT(prev_object->charge >= | KASSERT(prev_object->charge >= | ||||
ptoa(prev_object->size - next_pindex), | ptoa(prev_object->size - next_pindex), | ||||
("object %p overcharged 1 %jx %jx", prev_object, | ("object %p overcharged 1 %jx %jx", prev_object, | ||||
(uintmax_t)next_pindex, (uintmax_t)next_size)); | (uintmax_t)next_pindex, (uintmax_t)next_size)); | ||||
prev_object->charge -= ptoa(prev_object->size - | prev_object->charge -= ptoa(prev_object->size - | ||||
next_pindex); | next_pindex); | ||||
▲ Show 20 Lines • Show All 543 Lines • Show Last 20 Lines |