| 5000 | } |
| 5001 | |
| 5002 | void |
| 5003 | uma_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 */ |
| 5021 | void |
nothing calls this directly
no test coverage detected