Page MenuHomeFreeBSD

x86: avoid domains with no usable CPUs
AbandonedPublic

Authored by emaste on Aug 18 2023, 3:14 AM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Jul 10, 3:22 AM
Unknown Object (File)
Mon, Jul 6, 4:19 PM
Unknown Object (File)
Mon, Jul 6, 3:58 PM
Unknown Object (File)
Sun, Jul 5, 10:28 PM
Unknown Object (File)
Sun, Jul 5, 2:00 AM
Unknown Object (File)
Fri, Jul 3, 3:24 AM
Unknown Object (File)
Fri, Jun 19, 1:09 PM
Unknown Object (File)
May 22 2026, 1:08 AM
Subscribers
None

Details

Reviewers
jhb
markj
Summary

If we limit the CPUs which will receive interrupts we may have a domain with no usable CPUs. Allow any allowable CPU to be used when requesting a CPU for such a domain.

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

emaste created this revision.

I was thinking of adding a tunable to have set_interrupt_apic_ids skip APIC IDs > 255. However, this may result in a &cpuset[domain] that has no common entries with &intr_cpus, hence this review. Very happy to hear of other ideas for a usable workaround for this APIC ID > 255 issue.

Or maybe something simpler - if we find an unusable domain fall back to no per-domain lists. D41501

sys/x86/x86/intr_machdep.c
587

I think you can replace this loop with domain_usable[i] = CPU_OVERLAP(&cpuset_domain[i], &intr_cpus);.

589

Maybe "CPUs from domain %d cannot service interrupts"? "has no usable CPUs" sounds scary and might confuse users.

sys/x86/x86/intr_machdep.c
587

I think I prefer the D41501 approach, but will apply both of these comments there

oops updated wrong review - restore this diff

Hmm, my suggestion over in D41501 is a hybrid of both approaches I think.