Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F102662168
D41500.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D41500.diff
View Options
Index: sys/x86/x86/intr_machdep.c
===================================================================
--- sys/x86/x86/intr_machdep.c
+++ sys/x86/x86/intr_machdep.c
@@ -569,13 +569,25 @@
cpuset_t intr_cpus = CPUSET_T_INITIALIZER(0x1);
static int current_cpu[MAXMEMDOM];
+static bool domain_usable[MAXMEMDOM];
static void
intr_init_cpus(void)
{
- int i;
+ int i, j;
for (i = 0; i < vm_ndomains; i++) {
+ /* Check if we have any usable CPUs in this domain. */
+ for (j = 0; j <= mp_maxid; j++) {
+ if (CPU_ISSET(j, &intr_cpus) &&
+ CPU_ISSET(j, &cpuset_domain[i])) {
+ domain_usable[i] = true;
+ break;
+ }
+ }
+ if (!domain_usable[i])
+ printf("%s: domain %d has no usable CPUs\n", __func__, i);
+
current_cpu[i] = 0;
if (!CPU_ISSET(current_cpu[i], &intr_cpus) ||
!CPU_ISSET(current_cpu[i], &cpuset_domain[i]))
@@ -603,7 +615,8 @@
if (current_cpu[domain] > mp_maxid)
current_cpu[domain] = 0;
} while (!CPU_ISSET(current_cpu[domain], &intr_cpus) ||
- !CPU_ISSET(current_cpu[domain], &cpuset_domain[domain]));
+ (!CPU_ISSET(current_cpu[domain], &cpuset_domain[domain]) &&
+ domain_usable[domain]));
mtx_unlock_spin(&icu_lock);
return (apic_id);
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Nov 16, 12:39 PM (6 h, 15 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14658850
Default Alt Text
D41500.diff (1 KB)
Attached To
Mode
D41500: x86: avoid domains with no usable CPUs
Attached
Detach File
Event Timeline
Log In to Comment