summaryrefslogtreecommitdiffstats
path: root/sys/vm/uma_core.c
diff options
context:
space:
mode:
authorjeff <jeff@FreeBSD.org>2002-04-10 01:52:50 +0000
committerjeff <jeff@FreeBSD.org>2002-04-10 01:52:50 +0000
commitbd519d5625e1d22fabb246b8578420d4a5fffd06 (patch)
tree433bd2c1b4225df934cb0596140d8d6e87ccd637 /sys/vm/uma_core.c
parent64abb46d2e248eda42bb3af71d4f02eb6cae14f0 (diff)
downloadFreeBSD-src-bd519d5625e1d22fabb246b8578420d4a5fffd06.zip
FreeBSD-src-bd519d5625e1d22fabb246b8578420d4a5fffd06.tar.gz
Remember to unlock the zone if the fill count is too high.
Pointed out by: pete, jake, jhb
Diffstat (limited to 'sys/vm/uma_core.c')
-rw-r--r--sys/vm/uma_core.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/vm/uma_core.c b/sys/vm/uma_core.c
index 6699a09..ad777b7 100644
--- a/sys/vm/uma_core.c
+++ b/sys/vm/uma_core.c
@@ -1210,7 +1210,6 @@ uma_startup3(void)
#ifdef UMA_DEBUG
printf("Starting callout.\n");
#endif
- /* We'll be mpsafe once the vm is locked. */
callout_init(&uma_callout, 0);
callout_reset(&uma_callout, UMA_WORKING_TIME * hz, uma_timeout, NULL);
#ifdef UMA_DEBUG
@@ -1422,11 +1421,13 @@ uma_zalloc_internal(uma_zone_t zone, void *udata, int wait, uma_bucket_t bucket)
if (bucket) {
#ifdef SMP
- if (zone->uz_fills >= mp_ncpus)
+ if (zone->uz_fills >= mp_ncpus) {
#else
- if (zone->uz_fills > 1)
+ if (zone->uz_fills > 1) {
#endif
+ ZONE_UNLOCK(zone);
return (NULL);
+ }
zone->uz_fills++;
}
OpenPOWER on IntegriCloud