Page MenuHomeFreeBSD

By default bind interrupts to the set of CPUs in the domain they are connected to
ClosedPublic

Authored by jeff on Mar 25 2018, 1:19 AM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Oct 28, 11:38 PM
Unknown Object (File)
Oct 20 2024, 3:52 AM
Unknown Object (File)
Oct 19 2024, 2:01 AM
Unknown Object (File)
Oct 4 2024, 7:39 PM
Unknown Object (File)
Oct 4 2024, 3:06 PM
Unknown Object (File)
Oct 2 2024, 8:26 AM
Unknown Object (File)
Oct 2 2024, 3:19 AM
Unknown Object (File)
Oct 1 2024, 10:32 PM
Subscribers

Details

Summary

This changes the default behavior from round-robin between all CPUs to round-robin among all CPUs in the identified domain. This can be overridden by binding the interrupts directly to the CPUs of choice as you would otherwise. I think this code should eventually be pulled up into an MI interface anyway but I didn't want to tackle that as part of this project.

I moved the vm_ndomains definition to make it easier to include. vm_phys.h requires vm_page.h which gets you into a half dozen vm headers just to use one int. So I put it in vm.h for simplicity.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

x86/x86/intr_machdep.c
514 ↗(On Diff #40714)

Don't you need to initialize current_cpu for each domain to some CPU belonging to that domain ? Otherwise, the first call to intr_next_cpu() for each domain would return apic_id of BSP. Or I am missing something there.

707 ↗(On Diff #40714)

And there.

jeff marked 2 inline comments as done.Mar 25 2018, 6:56 PM
jeff added inline comments.
x86/x86/intr_machdep.c
514 ↗(On Diff #40714)

You are right. I will fix this.

jhb added inline comments.
x86/x86/nexus.c
592 ↗(On Diff #40714)

I would sort of prefer the logic for how to handle devices without a domain to be centralized in intr_add_handler() (e.g. set to -1 here and then have intr_add_handler() set to 0) in case we want to modify that in the future to do the legacy thing of round-robin among all CPUs, but that is a minor nit.

This revision is now accepted and ready to land.Mar 27 2018, 12:00 AM
This revision was automatically updated to reflect the committed changes.