svn commit: r337467 - stable/11/sys/vm
Mark Johnston
markj at FreeBSD.org
Wed Aug 8 17:22:42 UTC 2018
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);
More information about the svn-src-all
mailing list