Changeset View
Changeset View
Standalone View
Standalone View
head/sys/vm/swap_pager.c
Show First 20 Lines • Show All 3,032 Lines • ▼ Show 20 Lines | |||||
} | } | ||||
static void | static void | ||||
swap_pager_update_writecount(vm_object_t object, vm_offset_t start, | swap_pager_update_writecount(vm_object_t object, vm_offset_t start, | ||||
vm_offset_t end) | vm_offset_t end) | ||||
{ | { | ||||
VM_OBJECT_WLOCK(object); | VM_OBJECT_WLOCK(object); | ||||
KASSERT((object->flags & OBJ_NOSPLIT) != 0, | KASSERT((object->flags & OBJ_ANON) == 0, | ||||
("Splittable object with writecount")); | ("Splittable object with writecount")); | ||||
object->un_pager.swp.writemappings += (vm_ooffset_t)end - start; | object->un_pager.swp.writemappings += (vm_ooffset_t)end - start; | ||||
VM_OBJECT_WUNLOCK(object); | VM_OBJECT_WUNLOCK(object); | ||||
} | } | ||||
static void | static void | ||||
swap_pager_release_writecount(vm_object_t object, vm_offset_t start, | swap_pager_release_writecount(vm_object_t object, vm_offset_t start, | ||||
vm_offset_t end) | vm_offset_t end) | ||||
{ | { | ||||
VM_OBJECT_WLOCK(object); | VM_OBJECT_WLOCK(object); | ||||
KASSERT((object->flags & OBJ_NOSPLIT) != 0, | KASSERT((object->flags & OBJ_ANON) == 0, | ||||
("Splittable object with writecount")); | ("Splittable object with writecount")); | ||||
object->un_pager.swp.writemappings -= (vm_ooffset_t)end - start; | object->un_pager.swp.writemappings -= (vm_ooffset_t)end - start; | ||||
VM_OBJECT_WUNLOCK(object); | VM_OBJECT_WUNLOCK(object); | ||||
} | } |