aboutsummaryrefslogtreecommitdiff
path: root/sys/kern/sched_ule.c
diff options
context:
space:
mode:
authorAlexander Motin <mav@FreeBSD.org>2021-09-23 17:41:02 +0000
committerAlexander Motin <mav@FreeBSD.org>2021-09-23 18:31:38 +0000
commitef50d5fbc39fc39970eab1234222b5ac1d9ba74c (patch)
treeb0fee56fd1e8d1d69f60dd92cd72a7449f9b29b0 /sys/kern/sched_ule.c
parent1ca931a540cbb1891f535832ee6ef40ae3ed3910 (diff)
downloadsrc-ef50d5fbc39fc39970eab1234222b5ac1d9ba74c.tar.gz
src-ef50d5fbc39fc39970eab1234222b5ac1d9ba74c.zip
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
Diffstat (limited to 'sys/kern/sched_ule.c')
-rw-r--r--sys/kern/sched_ule.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/kern/sched_ule.c b/sys/kern/sched_ule.c
index d1e4010d2ebe..49199b6f319f 100644
--- a/sys/kern/sched_ule.c
+++ b/sys/kern/sched_ule.c
@@ -3098,6 +3098,8 @@ sysctl_kern_sched_topology_spec_internal(struct sbuf *sb, struct cpu_group *cg,
sbuf_printf(sb, "<flag name=\"THREAD\">THREAD group</flag>");
if ((cg->cg_flags & CG_FLAG_SMT) != 0)
sbuf_printf(sb, "<flag name=\"SMT\">SMT group</flag>");
+ if ((cg->cg_flags & CG_FLAG_NODE) != 0)
+ sbuf_printf(sb, "<flag name=\"NODE\">NUMA node</flag>");
sbuf_printf(sb, "</flags>\n");
}