From owner-svn-src-head@freebsd.org Tue Feb 6 10:54:46 2018 Return-Path: Delivered-To: svn-src-head@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 A3526EEDF01; Tue, 6 Feb 2018 10:54:46 +0000 (UTC) (envelope-from andrew@fubar.geek.nz) Received: from fry.fubar.geek.nz (fry.fubar.geek.nz [139.59.165.16]) by mx1.freebsd.org (Postfix) with ESMTP id 3FB7682830; Tue, 6 Feb 2018 10:54:45 +0000 (UTC) (envelope-from andrew@fubar.geek.nz) Received: from [IPv6:2a02:c7f:1e13:cf00:258a:a641:4133:b7aa] (unknown [IPv6:2a02:c7f:1e13:cf00:258a:a641:4133:b7aa]) by fry.fubar.geek.nz (Postfix) with ESMTPSA id C0D434EBDB; Tue, 6 Feb 2018 10:54:06 +0000 (UTC) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 11.2 \(3445.5.20\)) Subject: Re: svn commit: r328916 - in head/sys: kern vm From: Andrew Turner In-Reply-To: <201802060416.w164G0va096970@repo.freebsd.org> Date: Tue, 6 Feb 2018 10:54:05 +0000 Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <6675B0B0-A582-4D5A-832B-A0E0E13B9E6C@fubar.geek.nz> References: <201802060416.w164G0va096970@repo.freebsd.org> To: Gleb Smirnoff X-Mailer: Apple Mail (2.3445.5.20) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Feb 2018 10:54:46 -0000 > On 6 Feb 2018, at 04:16, Gleb Smirnoff wrote: >=20 > Author: glebius > Date: Tue Feb 6 04:16:00 2018 > New Revision: 328916 > URL: https://svnweb.freebsd.org/changeset/base/328916 >=20 > Log: > Followup on r302393 by cperciva, improving calculation of boot pages = required > for UMA startup. >=20 > o Introduce another stage of UMA startup, which is entered after > vm_page_startup() finishes. After this stage we don't yet enable = buckets, > but we can ask VM for pages. Rename stages to meaningful names = while here. > New list of stages: BOOT_COLD, BOOT_STRAPPED, BOOT_PAGEALLOC, = BOOT_BUCKETS, > BOOT_RUNNING. > Enabling page alloc earlier allows us to dramatically reduce number = of > boot pages required. What is more important number of zones becomes > consistent across different machines, as no MD allocations are done = before > the BOOT_PAGEALLOC stage. Now only UMA internal zones actually need = to use > startup_alloc(), however that may change, so vm_page_startup() = provides > its need for early zones as argument. > o Introduce uma_startup_count() function, to avoid code duplication. = The > functions calculates sizes of zones zone and kegs zone, and = calculates how > many pages UMA will need to bootstrap. > It counts not only of zone structures, but also of kegs, slabs and = hashes. > o Hide uma_startup_foo() declarations from public file. > o Provide several DIAGNOSTIC printfs on boot_pages usage. > o Bugfix: when calculating zone of zones size use (mp_maxid + 1) = instead of > mp_ncpus. Use resulting number not only in the size argument to = zone_ctor() > but also as args.size. With this I=E2=80=99m getting "panic: UMA: Increase vm.boot_pages=E2=80=9D= on an arm64 simulator with 4GB of memory. I can increase vm.boot_pages = manually, however this isn=E2=80=99t useful in the long term. Andrew