mirror of
https://github.com/opnsense/src.git
synced 2026-06-09 08:43:19 -04:00
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
This commit is contained in:
parent
51e7276365
commit
8daee410d2
1 changed files with 3 additions and 2 deletions
|
|
@ -147,7 +147,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();
|
||||
|
||||
|
|
@ -168,7 +169,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);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
|||
Loading…
Reference in a new issue