git: 3736b79f0fa7 - stable/14 - vm: Use vmem_xalloc in kva_alloc
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 02 Sep 2024 08:50:34 UTC
The branch stable/14 has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=3736b79f0fa7655288f922d085b90eb5e0347067 commit 3736b79f0fa7655288f922d085b90eb5e0347067 Author: Andrew Turner <andrew@FreeBSD.org> AuthorDate: 2023-11-29 12:11:37 +0000 Commit: Andrew Turner <andrew@FreeBSD.org> CommitDate: 2024-09-02 08:43:01 +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 f94200d77c47..35dbae20449f 100644 --- a/sys/vm/vm_kern.c +++ b/sys/vm/vm_kern.c @@ -149,7 +149,8 @@ kva_alloc(vm_size_t size) TSENTER(); 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); TSEXIT(); @@ -170,7 +171,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); } /*