From c16bd872dc52b9f593128e91d214fbd9f225b83c Mon Sep 17 00:00:00 2001 From: Mark Johnston Date: Fri, 3 Aug 2018 16:35:37 +0000 Subject: [PATCH] Add the required page accounting to kmem_bootstrap_free(). Reviewed by: alc, kib MFC after: 3 days Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D16581 --- sys/vm/vm_kern.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sys/vm/vm_kern.c b/sys/vm/vm_kern.c index e444ac976d8d..b10579d60357 100644 --- a/sys/vm/vm_kern.c +++ b/sys/vm/vm_kern.c @@ -714,7 +714,11 @@ kmem_bootstrap_free(vm_offset_t start, vm_size_t size) vmd = vm_pagequeue_domain(m); vm_domain_free_lock(vmd); vm_phys_free_pages(m, 0); + vmd->vmd_page_count++; vm_domain_free_unlock(vmd); + + vm_domain_freecnt_inc(vmd, 1); + vm_cnt.v_page_count++; } pmap_remove(kernel_pmap, start, end); (void)vmem_add(kernel_arena, start, end - start, M_WAITOK);