Changeset View
Changeset View
Standalone View
Standalone View
head/sys/vm/uma_core.c
Show First 20 Lines • Show All 3,171 Lines • ▼ Show 20 Lines | for (;;) { | ||||
sx_xlock(&uma_drain_lock); | sx_xlock(&uma_drain_lock); | ||||
while (uma_reclaim_needed == 0) | while (uma_reclaim_needed == 0) | ||||
sx_sleep(uma_reclaim, &uma_drain_lock, PVM, "umarcl", | sx_sleep(uma_reclaim, &uma_drain_lock, PVM, "umarcl", | ||||
hz); | hz); | ||||
sx_xunlock(&uma_drain_lock); | sx_xunlock(&uma_drain_lock); | ||||
EVENTHANDLER_INVOKE(vm_lowmem, VM_LOW_KMEM); | EVENTHANDLER_INVOKE(vm_lowmem, VM_LOW_KMEM); | ||||
sx_xlock(&uma_drain_lock); | sx_xlock(&uma_drain_lock); | ||||
uma_reclaim_locked(true); | uma_reclaim_locked(true); | ||||
atomic_set_int(&uma_reclaim_needed, 0); | uma_reclaim_needed = 0; | ||||
sx_xunlock(&uma_drain_lock); | sx_xunlock(&uma_drain_lock); | ||||
/* Don't fire more than once per-second. */ | /* Don't fire more than once per-second. */ | ||||
pause("umarclslp", hz); | pause("umarclslp", hz); | ||||
} | } | ||||
} | } | ||||
/* See uma.h */ | /* See uma.h */ | ||||
int | int | ||||
▲ Show 20 Lines • Show All 491 Lines • Show Last 20 Lines |