Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F175049722
D28579.id83663.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
915 B
Referenced Files
None
Subscribers
None
D28579.id83663.diff
View Options
Index: sys/arm64/arm64/mp_machdep.c
===================================================================
--- sys/arm64/arm64/mp_machdep.c
+++ sys/arm64/arm64/mp_machdep.c
@@ -437,8 +437,27 @@
struct cpu_group *
cpu_topo(void)
{
-
- return (smp_topo_none());
+ cpuset_t dom;
+ int cpuspdom, i, j;
+
+ if (vm_ndomains == 1)
+ return (smp_topo_none());
+ if (mp_ncpus % vm_ndomains != 0) {
+ printf("%s: unbalanced NUMA domains detected\n", __func__);
+ return (smp_topo_none());
+ }
+ cpuspdom = mp_ncpus / vm_ndomains;
+ for (i = 0; i < vm_ndomains; i++) {
+ CPU_ZERO(&dom);
+ for (j = 0; j < cpuspdom; j++)
+ CPU_SET(i * cpuspdom + j, &dom);
+ if (CPU_CMP(&dom, &cpuset_domain[i]) != 0) {
+ printf("%s: non-contiguous NUMA domains detected\n",
+ __func__);
+ return (smp_topo_none());
+ }
+ }
+ return (smp_topo_1level(CG_SHARE_L3, cpuspdom, 0));
}
/* Determine if we running MP machine */
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Oct 8, 9:48 PM (14 h, 35 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
40445795
Default Alt Text
D28579.id83663.diff (915 B)
Attached To
Mode
D28579: arm64: Include NUMA locality info in the CPU topology
Attached
Detach File
Event Timeline
Log In to Comment