HomeFreeBSD

vmem: Avoid allocating span tags when segments are never released.

Description

vmem: Avoid allocating span tags when segments are never released.

vmem uses span tags to delimit imported segments, so that they can be
released if the segment becomes free in the future. However, the
per-domain kernel KVA arenas never release resources, so the span tags
between imported ranges are unused when the ranges are contiguous.
Furthermore, such span tags prevent coalescing of free segments across
KVA_QUANTUM boundaries, resulting in internal fragmentation which
inhibits superpage promotion in the kernel map.

Stop allocating span tags in arenas that never release resources. This
saves a small amount of memory and allows free segements to coalesce
across import boundaries. This manifests as improved kernel superpage
usage during poudriere runs, which also helps to reduce physical memory
fragmentation by reducing the number of broken partially populated
reservations.

Tested by: pho
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D24548

Details

Provenance
markjAuthored on
Differential Revision
D24548: vmem: Avoid allocating span tags when segments are never released.
Parents
rS364818: efibootmgr: wrong check for opts.order
Branches
Unknown
Tags
Unknown