* Insert a new reservation into the object's objq. */
| 412 | * Insert a new reservation into the object's objq. |
| 413 | */ |
| 414 | static void |
| 415 | vm_reserv_insert(vm_reserv_t rv, vm_object_t object, vm_pindex_t pindex) |
| 416 | { |
| 417 | int i; |
| 418 | |
| 419 | vm_reserv_assert_locked(rv); |
| 420 | CTR6(KTR_VM, |
| 421 | "%s: rv %p(%p) object %p new %p popcnt %d", |
| 422 | __FUNCTION__, rv, rv->pages, rv->object, object, |
| 423 | rv->popcnt); |
| 424 | KASSERT(rv->object == NULL, |
| 425 | ("vm_reserv_insert: reserv %p isn't free", rv)); |
| 426 | KASSERT(rv->popcnt == 0, |
| 427 | ("vm_reserv_insert: reserv %p's popcnt is corrupted", rv)); |
| 428 | KASSERT(!rv->inpartpopq, |
| 429 | ("vm_reserv_insert: reserv %p's inpartpopq is TRUE", rv)); |
| 430 | for (i = 0; i < NPOPMAP; i++) |
| 431 | KASSERT(rv->popmap[i] == 0, |
| 432 | ("vm_reserv_insert: reserv %p's popmap is corrupted", rv)); |
| 433 | vm_reserv_object_lock(object); |
| 434 | rv->pindex = pindex; |
| 435 | rv->object = object; |
| 436 | rv->lasttick = ticks; |
| 437 | LIST_INSERT_HEAD(&object->rvq, rv, objq); |
| 438 | vm_reserv_object_unlock(object); |
| 439 | } |
| 440 | |
| 441 | /* |
| 442 | * Reduces the given reservation's population count. If the population count |
no outgoing calls
no test coverage detected