summaryrefslogtreecommitdiffstats
path: root/sys/vm/uma.h
diff options
context:
space:
mode:
authorpjd <pjd@FreeBSD.org>2012-12-07 22:27:13 +0000
committerpjd <pjd@FreeBSD.org>2012-12-07 22:27:13 +0000
commita585ca9ec8ad3532db09d36b1fda6a32fd732cc9 (patch)
tree3471176b32a524b1295b426d984e14fabbb45a3b /sys/vm/uma.h
parent0ae3a2ffee9d425fa3561bcd043c229dd7a5c96d (diff)
downloadFreeBSD-src-a585ca9ec8ad3532db09d36b1fda6a32fd732cc9.zip
FreeBSD-src-a585ca9ec8ad3532db09d36b1fda6a32fd732cc9.tar.gz
Implemented uma_zone_set_warning(9) function that sets a warning, which
will be printed once the given zone becomes full and cannot allocate an item. The warning will not be printed more often than every five minutes. All UMA warnings can be globally turned off by setting sysctl/tunable vm.zone_warnings to 0. Discussed on: arch Obtained from: WHEEL Systems MFC after: 2 weeks
Diffstat (limited to 'sys/vm/uma.h')
-rw-r--r--sys/vm/uma.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/sys/vm/uma.h b/sys/vm/uma.h
index 8a12fe1..28d5ee0 100644
--- a/sys/vm/uma.h
+++ b/sys/vm/uma.h
@@ -476,6 +476,18 @@ int uma_zone_set_max(uma_zone_t zone, int nitems);
int uma_zone_get_max(uma_zone_t zone);
/*
+ * Sets a warning to be printed when limit is reached
+ *
+ * Arguments:
+ * zone The zone we will warn about
+ * warning Warning content
+ *
+ * Returns:
+ * Nothing
+ */
+void uma_zone_set_warning(uma_zone_t zone, const char *warning);
+
+/*
* Obtains the approximate current number of items allocated from a zone
*
* Arguments:
OpenPOWER on IntegriCloud