summaryrefslogtreecommitdiffstats
path: root/sys/vm/vm_kern.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/vm/vm_kern.c')
-rw-r--r--sys/vm/vm_kern.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/sys/vm/vm_kern.c b/sys/vm/vm_kern.c
index 7ab7c08..2e5ea30 100644
--- a/sys/vm/vm_kern.c
+++ b/sys/vm/vm_kern.c
@@ -70,6 +70,7 @@
#include <sys/param.h>
#include <sys/systm.h>
+#include <sys/kernel.h> /* for ticks and hz */
#include <sys/lock.h>
#include <sys/mutex.h>
#include <sys/proc.h>
@@ -331,8 +332,13 @@ kmem_malloc(map, size, flags)
if (vm_map_findspace(map, vm_map_min(map), size, &addr)) {
vm_map_unlock(map);
if (map != kmem_map) {
- printf("Out of mbuf address space!\n");
- printf("Consider increasing NMBCLUSTERS\n");
+ static int last_report; /* when we did it (in ticks) */
+ if (ticks < last_report ||
+ (ticks - last_report) >= hz) {
+ last_report = ticks;
+ printf("Out of mbuf address space!\n");
+ printf("Consider increasing NMBCLUSTERS\n");
+ }
goto bad;
}
if ((flags & M_NOWAIT) == 0)
OpenPOWER on IntegriCloud