diff options
-rw-r--r-- | sys/kern/subr_vmem.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sys/kern/subr_vmem.c b/sys/kern/subr_vmem.c index 20070fc..baaee84 100644 --- a/sys/kern/subr_vmem.c +++ b/sys/kern/subr_vmem.c @@ -746,6 +746,12 @@ vmem_periodic(void *unused, int pending) /* Grow in powers of two. Shrink less aggressively. */ if (desired >= current * 2 || desired * 4 <= current) vmem_rehash(vm, desired); + + /* + * Periodically wake up threads waiting for resources, + * so they could ask for reclamation again. + */ + VMEM_CONDVAR_BROADCAST(vm); } mtx_unlock(&vmem_list_lock); |