From bce9779110e6660d49f5fe8a95418a3f5a11c1ab Mon Sep 17 00:00:00 2001 From: Jeff Roberson Date: Wed, 10 Apr 2002 01:52:50 +0000 Subject: Remember to unlock the zone if the fill count is too high. Pointed out by: pete, jake, jhb --- sys/vm/uma_core.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'sys/vm') diff --git a/sys/vm/uma_core.c b/sys/vm/uma_core.c index 6699a09b80ee..ad777b702e27 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++; } -- cgit v1.2.3