diff options
author | mav <mav@FreeBSD.org> | 2014-01-04 23:40:47 +0000 |
---|---|---|
committer | mav <mav@FreeBSD.org> | 2014-01-04 23:40:47 +0000 |
commit | 91cfd3a7cc7cf9c59406b5a004d657fa9212d2c6 (patch) | |
tree | 806f409cf2d77f4ad67d44eaad481bc7831a307b /sys/vm/uma_core.c | |
parent | 3ff6064c463764031c36770a10668d1efc58e02b (diff) | |
download | FreeBSD-src-91cfd3a7cc7cf9c59406b5a004d657fa9212d2c6.zip FreeBSD-src-91cfd3a7cc7cf9c59406b5a004d657fa9212d2c6.tar.gz |
MFC r258691:
Don't count bucket allocation failures for UMA zones as their own failures.
There are good reasons for this to happen, such as recursion prevention, etc.
and they are not fatal since buckets are just an optimization mechanism.
Real bucket allocation failures are any way counted by the bucket zones
themselves, and we don't need double accounting there.
Diffstat (limited to 'sys/vm/uma_core.c')
-rw-r--r-- | sys/vm/uma_core.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/sys/vm/uma_core.c b/sys/vm/uma_core.c index 72c44d8..cc1c2c2 100644 --- a/sys/vm/uma_core.c +++ b/sys/vm/uma_core.c @@ -2510,7 +2510,7 @@ zone_alloc_bucket(uma_zone_t zone, void *udata, int flags) /* Don't wait for buckets, preserve caller's NOVM setting. */ bucket = bucket_alloc(zone, udata, M_NOWAIT | (flags & M_NOVM)); if (bucket == NULL) - goto out; + return (NULL); max = MIN(bucket->ub_entries, zone->uz_count); bucket->ub_cnt = zone->uz_import(zone->uz_arg, bucket->ub_bucket, @@ -2541,10 +2541,8 @@ zone_alloc_bucket(uma_zone_t zone, void *udata, int flags) } } -out: - if (bucket == NULL || bucket->ub_cnt == 0) { - if (bucket != NULL) - bucket_free(zone, bucket, udata); + if (bucket->ub_cnt == 0) { + bucket_free(zone, bucket, udata); atomic_add_long(&zone->uz_fails, 1); return (NULL); } |