]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
x86: Add NUMA nodes into CPU topology.
authorAlexander Motin <mav@FreeBSD.org>
Thu, 23 Sep 2021 17:41:02 +0000 (13:41 -0400)
committerAlexander Motin <mav@FreeBSD.org>
Thu, 23 Sep 2021 18:31:38 +0000 (14:31 -0400)
commitef50d5fbc39fc39970eab1234222b5ac1d9ba74c
treeb0fee56fd1e8d1d69f60dd92cd72a7449f9b29b0
parent1ca931a540cbb1891f535832ee6ef40ae3ed3910
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
sys/kern/sched_ule.c
sys/sys/smp.h
sys/x86/x86/mp_x86.c