HomeFreeBSD

x86: Add NUMA nodes into CPU topology.

Description

x86: Add NUMA nodes into CPU topology.

Depending on hardware, NUMA nodes may match last level caches, or
they may be above them (AMD Zen 2/3) or below (Intel Xeon w/ SNC).
This information is provided by ACPI instead of CPUID, and it is
provided for each CPU individually instead of mask widths, but
this code should be able to properly handle all the above cases.

This change should immediately allow idle stealing in sched_ule(4)
to prefer load from NUMA-local CPUs to remote ones when the node
does not match LLC. Later we may think of how to better handle it
on sched_pickcpu() side.

MFC after: 1 month

(cherry picked from commit ef50d5fbc39fc39970eab1234222b5ac1d9ba74c)

Details

Provenance
mavAuthored on Sep 23 2021, 5:41 PM
Parents
rGa3d50144ccd7: Fix build without SMP.
Branches
Unknown
Tags
Unknown