Changeset View
Changeset View
Standalone View
Standalone View
vm/vm_reserv.c
Context not available. | |||||
return (new_end); | return (new_end); | ||||
} | } | ||||
/* | |||||
* Returns the superpage containing the given page. | |||||
*/ | |||||
vm_page_t | |||||
vm_reserv_to_superpage(vm_page_t m) | |||||
{ | |||||
vm_reserv_t rv; | |||||
VM_OBJECT_ASSERT_LOCKED(m->object); | |||||
rv = vm_reserv_from_page(m); | |||||
return (rv->object == m->object && rv->popcnt == VM_LEVEL_0_NPAGES ? | |||||
markj: Can we assert that rv->object == m->object || rv->object == NULL? | |||||
Not Done Inline ActionsNo. There are situations involving copy-on-write, specifically, shadow object chains, in which a page and a reservation might legitimately, if only temporarily, differ. For example, suppose a superpage is created in object A. Then, object A acquires a shadow object B. However, the conditions for a collapse or a so-called "optimized" COW fault arise. We will start migrating pages from A to B (rather than allocating new pages and copying code/data over to the new pages). When the first page migrates to B, we will also migrate the reservation, but there will still be pages left in A that come from the reservation. alc: No. There are situations involving copy-on-write, specifically, shadow object chains, in which… | |||||
Not Done Inline ActionsI see, thanks. markj: I see, thanks. | |||||
rv->pages : NULL); | |||||
} | |||||
#endif /* VM_NRESERVLEVEL > 0 */ | #endif /* VM_NRESERVLEVEL > 0 */ | ||||
Context not available. |
Can we assert that rv->object == m->object || rv->object == NULL?