]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Implement NUMA support in uma(9) and malloc(9). Allocations from specific
authorjeff <jeff@FreeBSD.org>
Fri, 12 Jan 2018 23:25:05 +0000 (23:25 +0000)
committerjeff <jeff@FreeBSD.org>
Fri, 12 Jan 2018 23:25:05 +0000 (23:25 +0000)
commitf375b4dd66bc709573ad4286b3a5ac6c705ba4a8
tree170808c5b9dd499f9062138d282fffcacd3426d8
parente7c9f841137ae77f1ce3df6de9f037146c3d37bd
Implement NUMA support in uma(9) and malloc(9).  Allocations from specific
domains can be done by the _domain() API variants.  UMA also supports a
first-touch policy via the NUMA zone flag.

The slab layer is now segregated by VM domains and is precise.  It handles
iteration for round-robin directly.  The per-cpu cache layer remains
a mix of domains according to where memory is allocated and freed.  Well
behaved clients can achieve perfect locality with no performance penalty.

The direct domain allocation functions have to visit the slab layer and
so require per-zone locks which come at some expense.

Reviewed by: Attilio (a slightly older version)
Tested by: pho
Sponsored by: Netflix, Dell/EMC Isilon
19 files changed:
lib/libmemstat/memstat_uma.c
sys/amd64/amd64/uma_machdep.c
sys/arm64/arm64/uma_machdep.c
sys/i386/i386/pmap.c
sys/kern/kern_malloc.c
sys/kern/kern_mbuf.c
sys/kern/subr_busdma_bufalloc.c
sys/kern/subr_vmem.c
sys/kern/vfs_bio.c
sys/mips/mips/uma_machdep.c
sys/powerpc/aim/mmu_oea64.c
sys/powerpc/aim/slb.c
sys/powerpc/powerpc/uma_machdep.c
sys/riscv/riscv/uma_machdep.c
sys/sparc64/sparc64/vm_machdep.c
sys/sys/malloc.h
sys/vm/uma.h
sys/vm/uma_core.c
sys/vm/uma_int.h