svn commit: r364460 - head/sys/vm
Andrew Gallatin
gallatin at FreeBSD.org
Fri Aug 21 18:31:58 UTC 2020
Author: gallatin
Date: Fri Aug 21 18:31:57 2020
New Revision: 364460
URL: https://svnweb.freebsd.org/changeset/base/364460
Log:
uma: record allocation failures due to zone limits
The zone limit mechanism was recently reworked, and
allocation failures due to limits being exceeded
were inadvertently no longer being recorded. This
would lead to, for example, mbuf allocation failures
not being indicated in netstat -m or vmstat -z
Reviewed by: markj
Sponsored by: Netflix
Modified:
head/sys/vm/uma_core.c
Modified: head/sys/vm/uma_core.c
==============================================================================
--- head/sys/vm/uma_core.c Fri Aug 21 17:45:17 2020 (r364459)
+++ head/sys/vm/uma_core.c Fri Aug 21 18:31:57 2020 (r364460)
@@ -3952,8 +3952,10 @@ zone_alloc_item(uma_zone_t zone, void *udata, int doma
{
void *item;
- if (zone->uz_max_items > 0 && zone_alloc_limit(zone, 1, flags) == 0)
+ if (zone->uz_max_items > 0 && zone_alloc_limit(zone, 1, flags) == 0) {
+ counter_u64_add(zone->uz_fails, 1);
return (NULL);
+ }
/* Avoid allocs targeting empty domains. */
if (domain != UMA_ANYDOMAIN && VM_DOMAIN_EMPTY(domain))
More information about the svn-src-all
mailing list