git: c603969fa9e3 - stable/13 - vm: Use vmem_xalloc in kva_alloc
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 02 Sep 2024 09:12:32 UTC
The branch stable/13 has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=c603969fa9e38c9db488eae1bdadfbb2be62b6fa commit c603969fa9e38c9db488eae1bdadfbb2be62b6fa Author: Andrew Turner <andrew@FreeBSD.org> AuthorDate: 2023-11-29 12:11:37 +0000 Commit: Andrew Turner <andrew@FreeBSD.org> CommitDate: 2024-09-02 09:11:57 +0000 vm: Use vmem_xalloc in kva_alloc The kernel_arena used in kva_alloc has the qcache disabled. vmem_alloc will first try to use the qcache before falling back to vmem_xalloc. Rather than trying to use the qcache in vmem_alloc just call vmem_xalloc directly. Reviewed by: alc, kib, markj Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D42831 (cherry picked from commit 8daee410d2c13b4e8530b00e7877eeecf30bb064) --- sys/vm/vm_kern.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sys/vm/vm_kern.c b/sys/vm/vm_kern.c index 2d5d20d931d3..ba3badf29c3b 100644 --- a/sys/vm/vm_kern.c +++ b/sys/vm/vm_kern.c @@ -147,7 +147,8 @@ kva_alloc(vm_size_t size) vm_offset_t addr; size = round_page(size); - if (vmem_alloc(kernel_arena, size, M_BESTFIT | M_NOWAIT, &addr)) + if (vmem_xalloc(kernel_arena, size, 0, 0, 0, VMEM_ADDR_MIN, + VMEM_ADDR_MAX, M_BESTFIT | M_NOWAIT, &addr)) return (0); return (addr); @@ -167,7 +168,7 @@ kva_free(vm_offset_t addr, vm_size_t size) { size = round_page(size); - vmem_free(kernel_arena, addr, size); + vmem_xfree(kernel_arena, addr, size); } static vm_page_t