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, Nov 24, 5:28 PM
Unknown Object (File)
Fri, Nov 21, 9:37 PM
Unknown Object (File)
Fri, Nov 21, 1:02 AM
Unknown Object (File)
Fri, Nov 21, 12:58 AM
Unknown Object (File)
Fri, Nov 21, 12:57 AM
Unknown Object (File)
Fri, Nov 21, 12:53 AM
Unknown Object (File)
Wed, Nov 19, 6:13 PM
Unknown Object (File)
Sat, Nov 15, 4:46 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 Skipped
Unit
Tests Skipped

Event Timeline

x86/x86/intr_machdep.c
514

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

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

You are right. I will fix this.

jhb added inline comments.
x86/x86/nexus.c
592

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.