Only increment object generation count when inserting the page into
object page list. The only use of object generation count now is a restart of the scan in vm_object_page_clean(), which makes sense to do on the page addition. Page removals do not affect the dirtiness of the object, as well as manipulations with the shadow chain. Suggested and reviewed by: alc MFC after: 1 week
This commit is contained in:
parent
dfc44b4d0b
commit
743ac64197
@ -600,7 +600,6 @@ doterm:
|
||||
VM_OBJECT_LOCK(temp);
|
||||
LIST_REMOVE(object, shadow_list);
|
||||
temp->shadow_count--;
|
||||
temp->generation++;
|
||||
VM_OBJECT_UNLOCK(temp);
|
||||
object->backing_object = NULL;
|
||||
}
|
||||
@ -1192,7 +1191,6 @@ vm_object_shadow(
|
||||
VM_OBJECT_LOCK(source);
|
||||
LIST_INSERT_HEAD(&source->shadow_head, result, shadow_list);
|
||||
source->shadow_count++;
|
||||
source->generation++;
|
||||
#if VM_NRESERVLEVEL > 0
|
||||
result->flags |= source->flags & OBJ_COLORED;
|
||||
result->pg_color = (source->pg_color + OFF_TO_IDX(*offset)) &
|
||||
@ -1260,7 +1258,6 @@ vm_object_split(vm_map_entry_t entry)
|
||||
LIST_INSERT_HEAD(&source->shadow_head,
|
||||
new_object, shadow_list);
|
||||
source->shadow_count++;
|
||||
source->generation++;
|
||||
vm_object_reference_locked(source); /* for new_object */
|
||||
vm_object_clear_flag(source, OBJ_ONEMAPPING);
|
||||
VM_OBJECT_UNLOCK(source);
|
||||
@ -1651,7 +1648,6 @@ vm_object_collapse(vm_object_t object)
|
||||
*/
|
||||
LIST_REMOVE(object, shadow_list);
|
||||
backing_object->shadow_count--;
|
||||
backing_object->generation++;
|
||||
if (backing_object->backing_object) {
|
||||
VM_OBJECT_LOCK(backing_object->backing_object);
|
||||
LIST_REMOVE(backing_object, shadow_list);
|
||||
@ -1661,7 +1657,6 @@ vm_object_collapse(vm_object_t object)
|
||||
/*
|
||||
* The shadow_count has not changed.
|
||||
*/
|
||||
backing_object->backing_object->generation++;
|
||||
VM_OBJECT_UNLOCK(backing_object->backing_object);
|
||||
}
|
||||
object->backing_object = backing_object->backing_object;
|
||||
@ -1703,7 +1698,6 @@ vm_object_collapse(vm_object_t object)
|
||||
*/
|
||||
LIST_REMOVE(object, shadow_list);
|
||||
backing_object->shadow_count--;
|
||||
backing_object->generation++;
|
||||
|
||||
new_backing_object = backing_object->backing_object;
|
||||
if ((object->backing_object = new_backing_object) != NULL) {
|
||||
@ -1714,7 +1708,6 @@ vm_object_collapse(vm_object_t object)
|
||||
shadow_list
|
||||
);
|
||||
new_backing_object->shadow_count++;
|
||||
new_backing_object->generation++;
|
||||
vm_object_reference_locked(new_backing_object);
|
||||
VM_OBJECT_UNLOCK(new_backing_object);
|
||||
object->backing_object_offset +=
|
||||
|
@ -846,7 +846,6 @@ vm_page_remove(vm_page_t m)
|
||||
* And show that the object has one fewer resident page.
|
||||
*/
|
||||
object->resident_page_count--;
|
||||
object->generation++;
|
||||
/*
|
||||
* The vnode may now be recycled.
|
||||
*/
|
||||
@ -1983,7 +1982,6 @@ vm_page_cache(vm_page_t m)
|
||||
object->root = root;
|
||||
TAILQ_REMOVE(&object->memq, m, listq);
|
||||
object->resident_page_count--;
|
||||
object->generation++;
|
||||
|
||||
/*
|
||||
* Restore the default memory attribute to the page.
|
||||
@ -2395,7 +2393,6 @@ vm_page_set_invalid(vm_page_t m, int base, int size)
|
||||
("vm_page_set_invalid: page %p is mapped", m));
|
||||
m->valid &= ~bits;
|
||||
m->dirty &= ~bits;
|
||||
m->object->generation++;
|
||||
}
|
||||
|
||||
/*
|
||||
|
Loading…
x
Reference in New Issue
Block a user