Changeset View
Changeset View
Standalone View
Standalone View
sys/vm/vm_glue.c
Show First 20 Lines • Show All 289 Lines • ▼ Show 20 Lines | |||||
struct kstack_cache_entry *kstack_cache; | struct kstack_cache_entry *kstack_cache; | ||||
static int kstack_cache_size = 128; | static int kstack_cache_size = 128; | ||||
static int kstacks; | static int kstacks; | ||||
static struct mtx kstack_cache_mtx; | static struct mtx kstack_cache_mtx; | ||||
MTX_SYSINIT(kstack_cache, &kstack_cache_mtx, "kstkch", MTX_DEF); | MTX_SYSINIT(kstack_cache, &kstack_cache_mtx, "kstkch", MTX_DEF); | ||||
SYSCTL_INT(_vm, OID_AUTO, kstack_cache_size, CTLFLAG_RW, &kstack_cache_size, 0, | SYSCTL_INT(_vm, OID_AUTO, kstack_cache_size, CTLFLAG_RW, &kstack_cache_size, 0, | ||||
""); | "Size of the kernel stack cache"); | ||||
SYSCTL_INT(_vm, OID_AUTO, kstacks, CTLFLAG_RD, &kstacks, 0, | SYSCTL_INT(_vm, OID_AUTO, kstacks, CTLFLAG_RD, &kstacks, 0, | ||||
""); | "Number of kernel stacks currently running"); | ||||
/* | /* | ||||
* Create the kernel stack (including pcb for i386) for a new thread. | * Create the kernel stack (including pcb for i386) for a new thread. | ||||
* This routine directly affects the fork perf for a process and | * This routine directly affects the fork perf for a process and | ||||
* create performance for a thread. | * create performance for a thread. | ||||
*/ | */ | ||||
int | int | ||||
vm_thread_new(struct thread *td, int pages) | vm_thread_new(struct thread *td, int pages) | ||||
▲ Show 20 Lines • Show All 282 Lines • Show Last 20 Lines |