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

Function uma_reclaim_worker

freebsd/vm/uma_core.c:5002–5018  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5000}
5001
5002void
5003uma_reclaim_worker(void *arg __unused)
5004{
5005
5006 for (;;) {
5007 sx_xlock(&uma_reclaim_lock);
5008 while (atomic_load_int(&uma_reclaim_needed) == 0)
5009 sx_sleep(uma_reclaim, &uma_reclaim_lock, PVM, "umarcl",
5010 hz);
5011 sx_xunlock(&uma_reclaim_lock);
5012 EVENTHANDLER_INVOKE(vm_lowmem, VM_LOW_KMEM);
5013 uma_reclaim(UMA_RECLAIM_DRAIN_CPU);
5014 atomic_store_int(&uma_reclaim_needed, 0);
5015 /* Don't fire more than once per-second. */
5016 pause("umarclslp", hz);
5017 }
5018}
5019
5020/* See uma.h */
5021void

Callers

nothing calls this directly

Calls 1

uma_reclaimFunction · 0.85

Tested by

no test coverage detected