MCPcopy Create free account
hub / github.com/F-Stack/f-stack / vm_reserv_insert

Function vm_reserv_insert

freebsd/vm/vm_reserv.c:414–439  ·  view source on GitHub ↗

* Insert a new reservation into the object's objq. */

Source from the content-addressed store, hash-verified

412 * Insert a new reservation into the object's objq.
413 */
414static void
415vm_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

Callers 2

vm_reserv_alloc_contigFunction · 0.85
vm_reserv_alloc_pageFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected