Changeset View
Changeset View
Standalone View
Standalone View
sys/vm/vm_meter.c
Show First 20 Lines • Show All 100 Lines • ▼ Show 20 Lines | |||||
static void | static void | ||||
vmcounter_startup(void) | vmcounter_startup(void) | ||||
{ | { | ||||
counter_u64_t *cnt = (counter_u64_t *)&vm_cnt; | counter_u64_t *cnt = (counter_u64_t *)&vm_cnt; | ||||
COUNTER_ARRAY_ALLOC(cnt, VM_METER_NCOUNTERS, M_WAITOK); | COUNTER_ARRAY_ALLOC(cnt, VM_METER_NCOUNTERS, M_WAITOK); | ||||
} | } | ||||
SYSINIT(counter, SI_SUB_KMEM, SI_ORDER_FIRST, vmcounter_startup, NULL); | SYSINIT(counter, SI_SUB_KMEM, SI_ORDER_FIRST, vmcounter_startup); | ||||
SYSCTL_UINT(_vm, VM_V_FREE_MIN, v_free_min, | SYSCTL_UINT(_vm, VM_V_FREE_MIN, v_free_min, | ||||
CTLFLAG_RW, &vm_cnt.v_free_min, 0, "Minimum low-free-pages threshold"); | CTLFLAG_RW, &vm_cnt.v_free_min, 0, "Minimum low-free-pages threshold"); | ||||
SYSCTL_UINT(_vm, VM_V_FREE_TARGET, v_free_target, | SYSCTL_UINT(_vm, VM_V_FREE_TARGET, v_free_target, | ||||
CTLFLAG_RW, &vm_cnt.v_free_target, 0, "Desired free pages"); | CTLFLAG_RW, &vm_cnt.v_free_target, 0, "Desired free pages"); | ||||
SYSCTL_UINT(_vm, VM_V_FREE_RESERVED, v_free_reserved, | SYSCTL_UINT(_vm, VM_V_FREE_RESERVED, v_free_reserved, | ||||
CTLFLAG_RW, &vm_cnt.v_free_reserved, 0, "Pages reserved for deadlock"); | CTLFLAG_RW, &vm_cnt.v_free_reserved, 0, "Pages reserved for deadlock"); | ||||
SYSCTL_UINT(_vm, VM_V_INACTIVE_TARGET, v_inactive_target, | SYSCTL_UINT(_vm, VM_V_INACTIVE_TARGET, v_inactive_target, | ||||
▲ Show 20 Lines • Show All 441 Lines • Show Last 20 Lines |