From owner-svn-src-all@freebsd.org Wed Aug 8 17:22: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 DC5C210636B6; Wed, 8 Aug 2018 17:22:41 +0000 (UTC) (envelope-from markj@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 931F88828A; Wed, 8 Aug 2018 17:22:41 +0000 (UTC) (envelope-from markj@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 75CCC5AB5; Wed, 8 Aug 2018 17:22:41 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w78HMfaA096938; Wed, 8 Aug 2018 17:22:41 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w78HMf6j096937; Wed, 8 Aug 2018 17:22:41 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201808081722.w78HMf6j096937@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Wed, 8 Aug 2018 17:22:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r337467 - stable/11/sys/vm X-SVN-Group: stable-11 X-SVN-Commit-Author: markj X-SVN-Commit-Paths: stable/11/sys/vm X-SVN-Commit-Revision: 337467 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.27 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, 08 Aug 2018 17:22:42 -0000 Author: markj Date: Wed Aug 8 17:22:41 2018 New Revision: 337467 URL: https://svnweb.freebsd.org/changeset/base/337467 Log: MFC r337265: Add the required page accounting to kmem_bootstrap_free(). Modified: stable/11/sys/vm/vm_kern.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/vm/vm_kern.c ============================================================================== --- stable/11/sys/vm/vm_kern.c Wed Aug 8 17:12:06 2018 (r337466) +++ stable/11/sys/vm/vm_kern.c Wed Aug 8 17:22:41 2018 (r337467) @@ -549,6 +549,7 @@ void kmem_bootstrap_free(vm_offset_t start, vm_size_t size) { #if defined(__i386__) || defined(__amd64__) + struct vm_domain *vmd; vm_offset_t end, va; vm_paddr_t pa; vm_page_t m; @@ -560,9 +561,14 @@ kmem_bootstrap_free(vm_offset_t start, vm_size_t size) pa = pmap_kextract(va); m = PHYS_TO_VM_PAGE(pa); + vmd = vm_phys_domain(m); mtx_lock(&vm_page_queue_free_mtx); vm_phys_free_pages(m, 0); + vmd->vmd_page_count++; + vm_phys_freecnt_adj(m, 1); mtx_unlock(&vm_page_queue_free_mtx); + + vm_cnt.v_page_count++; } pmap_remove(kernel_pmap, start, end); (void)vmem_add(kernel_arena, start, end - start, M_WAITOK);