svn commit: r281487 - stable/10/sys/kern
Alexander Motin
mav at FreeBSD.org
Mon Apr 13 09:17:58 UTC 2015
Author: mav
Date: Mon Apr 13 09:17:57 2015
New Revision: 281487
URL: https://svnweb.freebsd.org/changeset/base/281487
Log:
MFC r280850:
Periodically wake up threads waiting for vmem(9) resources, so they could
ask for resource reclamation again.
This is kind of dirty hack, but as last resort this is better then stuck
indefinitely because of KVA fragmentation, waiting until some random event
free something sufficient. OpenSolaris also has this hack in its vmem(9).
Modified:
stable/10/sys/kern/subr_vmem.c
Directory Properties:
stable/10/ (props changed)
Modified: stable/10/sys/kern/subr_vmem.c
==============================================================================
--- stable/10/sys/kern/subr_vmem.c Mon Apr 13 08:35:03 2015 (r281486)
+++ stable/10/sys/kern/subr_vmem.c Mon Apr 13 09:17:57 2015 (r281487)
@@ -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);
More information about the svn-src-stable-10
mailing list