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

Function kstack_cache_init

freebsd/vm/vm_glue.c:470–481  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

468}
469
470static void
471kstack_cache_init(void *null)
472{
473 kstack_object = vm_object_allocate(OBJT_SWAP,
474 atop(VM_MAX_KERNEL_ADDRESS - VM_MIN_KERNEL_ADDRESS));
475 kstack_cache = uma_zcache_create("kstack_cache",
476 kstack_pages * PAGE_SIZE, NULL, NULL, NULL, NULL,
477 kstack_import, kstack_release, NULL,
478 UMA_ZONE_FIRSTTOUCH);
479 kstack_cache_size = imax(128, mp_ncpus * 4);
480 uma_zone_set_maxcache(kstack_cache, kstack_cache_size);
481}
482SYSINIT(vm_kstacks, SI_SUB_KMEM, SI_ORDER_ANY, kstack_cache_init, NULL);
483
484#ifdef KSTACK_USAGE_PROF

Callers

nothing calls this directly

Calls 4

vm_object_allocateFunction · 0.85
uma_zcache_createFunction · 0.85
imaxFunction · 0.85
uma_zone_set_maxcacheFunction · 0.85

Tested by

no test coverage detected