From owner-svn-src-all@FreeBSD.ORG Wed Nov 27 20:16:18 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A1C34DFC; Wed, 27 Nov 2013 20:16:18 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 914A325A7; Wed, 27 Nov 2013 20:16:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rARKGI55022040; Wed, 27 Nov 2013 20:16:18 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rARKGIvv022039; Wed, 27 Nov 2013 20:16:18 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201311272016.rARKGIvv022039@svn.freebsd.org> From: Alexander Motin Date: Wed, 27 Nov 2013 20:16:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258691 - head/sys/vm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Nov 2013 20:16:18 -0000 Author: mav Date: Wed Nov 27 20:16:18 2013 New Revision: 258691 URL: http://svnweb.freebsd.org/changeset/base/258691 Log: 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. Modified: head/sys/vm/uma_core.c Modified: head/sys/vm/uma_core.c ============================================================================== --- head/sys/vm/uma_core.c Wed Nov 27 19:55:42 2013 (r258690) +++ head/sys/vm/uma_core.c Wed Nov 27 20:16:18 2013 (r258691) @@ -2509,7 +2509,7 @@ zone_alloc_bucket(uma_zone_t zone, void /* 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, @@ -2540,10 +2540,8 @@ zone_alloc_bucket(uma_zone_t zone, void } } -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); }