diff options
author | pjd <pjd@FreeBSD.org> | 2012-12-07 22:27:13 +0000 |
---|---|---|
committer | pjd <pjd@FreeBSD.org> | 2012-12-07 22:27:13 +0000 |
commit | a585ca9ec8ad3532db09d36b1fda6a32fd732cc9 (patch) | |
tree | 3471176b32a524b1295b426d984e14fabbb45a3b /sys/vm/uma_int.h | |
parent | 0ae3a2ffee9d425fa3561bcd043c229dd7a5c96d (diff) | |
download | FreeBSD-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_int.h')
-rw-r--r-- | sys/vm/uma_int.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/vm/uma_int.h b/sys/vm/uma_int.h index d9d5394..71788ea 100644 --- a/sys/vm/uma_int.h +++ b/sys/vm/uma_int.h @@ -331,6 +331,10 @@ struct uma_zone { uint16_t uz_fills; /* Outstanding bucket fills */ uint16_t uz_count; /* Highest value ub_ptr can have */ + /* The next three fields are used to print a rate-limited warnings. */ + const char *uz_warning; /* Warning to print on failure */ + struct timeval uz_ratecheck; /* Warnings rate-limiting */ + /* * This HAS to be the last item because we adjust the zone size * based on NCPU and then allocate the space for the zones. |