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
This commit is contained in:
parent
71230912a7
commit
791dda877f
@ -3952,8 +3952,10 @@ zone_alloc_item(uma_zone_t zone, void *udata, int domain, int flags)
|
||||
{
|
||||
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))
|
||||
|
Loading…
x
Reference in New Issue
Block a user