| 468 | } |
| 469 | |
| 470 | static void |
| 471 | kstack_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 | } |
| 482 | SYSINIT(vm_kstacks, SI_SUB_KMEM, SI_ORDER_ANY, kstack_cache_init, NULL); |
| 483 | |
| 484 | #ifdef KSTACK_USAGE_PROF |
nothing calls this directly
no test coverage detected