From owner-svn-src-all@freebsd.org Tue Feb 6 22:13:41 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8923AF0C187; Tue, 6 Feb 2018 22:13:41 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 372D685282; Tue, 6 Feb 2018 22:13:41 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 320B91E083; Tue, 6 Feb 2018 22:13:41 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w16MDfNY040216; Tue, 6 Feb 2018 22:13:41 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w16MDfAp040215; Tue, 6 Feb 2018 22:13:41 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201802062213.w16MDfAp040215@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Tue, 6 Feb 2018 22:13:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r328955 - head/sys/vm X-SVN-Group: head X-SVN-Commit-Author: glebius X-SVN-Commit-Paths: head/sys/vm X-SVN-Commit-Revision: 328955 X-SVN-Commit-Repository: base 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.25 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: Tue, 06 Feb 2018 22:13:41 -0000 Author: glebius Date: Tue Feb 6 22:13:40 2018 New Revision: 328955 URL: https://svnweb.freebsd.org/changeset/base/328955 Log: Use correct arithmetic to calculate how many pages we need for kegs and hashes. There is no functional change with current sizes. Modified: head/sys/vm/uma_core.c Modified: head/sys/vm/uma_core.c ============================================================================== --- head/sys/vm/uma_core.c Tue Feb 6 22:10:07 2018 (r328954) +++ head/sys/vm/uma_core.c Tue Feb 6 22:13:40 2018 (r328955) @@ -1810,14 +1810,14 @@ uma_startup_count(int zones) pages += howmany(zones, UMA_SLAB_SIZE / zsize); /* ... and their kegs. */ - pages += howmany(ksize * zones, UMA_SLAB_SIZE); + pages += howmany(zones, UMA_SLAB_SIZE / ksize); /* * Take conservative approach that every zone * is going to allocate hash. */ - pages += howmany(sizeof(struct slabhead *) * UMA_HASH_SIZE_INIT * - zones, UMA_SLAB_SIZE); + pages += howmany(zones, UMA_SLAB_SIZE / + (sizeof(struct slabhead *) * UMA_HASH_SIZE_INIT)); return (pages); }