HomeFreeBSD

smp_topo: dynamically allocate group array

Description

smp_topo: dynamically allocate group array

Limit its size to mp_maxid + 1 times MAX_CACHE_LEVELS instead MAXCPU.
Allocate the array on a first call into smp_topo(9) functions, where
the mp_maxid is already known.

Make the array private to smp_topo_alloc(), assuming that the callers
that allocate top-level group do it once.

Reviewed by: markj
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D39981

Details

Provenance
kibAuthored on May 5 2023, 8:24 PM
Reviewer
markj
Differential Revision
D39981: Eliminate MAXCPU from subr_smp.c
Parents
rGccc6b87b3825: quiesce_cpus(): do not overallocate generation array
Branches
Unknown
Tags
Unknown