Page MenuHomeFreeBSD

make maximum interrupt number tunable on ARM, ARM64, MIPS, and RISC-V
ClosedPublic

Authored by gonzo on Dec 30 2020, 7:02 AM.

Details

Summary

Use a machdep.nirq tunable intead of compile-time constant NIRQ
as a value for maximum number of interrupts. It allows keep a system
footprint small by default with an option to increase the limit
for large systems like server-grade ARM64

Diff Detail

Repository
R10 FreeBSD src repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

gonzo requested review of this revision.Dec 30 2020, 7:02 AM
sys/kern/subr_intr.c
145–146

Since we are now sizing this dynamically, it would make more sense to do it based on mp_ncpus. You might also drop this constant and just inline it in intr_irq_init(), since it is not used elsewhere.

149

machdep_ is an unusual prefix for a variable --- I don't think anything else is named that way. Maybe intr_nirq if not just nirq?

408

Is there a reason to use irq_sources_count rather than just machdep_nirq?

1730

Could push M_WAITOK to the next line if it becomes too long.

gonzo added inline comments.
sys/kern/subr_intr.c
145–146

Fixed the constant. I'd like to leave mp_ncpus for another round of changes.

149

Fixed

408

Just an automatic renaming. Fixed.

gonzo marked 3 inline comments as done.
  • Address mhorne's comments

A couple of small nitpicks, otherwise LGTM.

sys/kern/subr_intr.c
184

You can drop the extra newline.

408

Thanks, but it looks like irq_sources_count can be dropped altogether in favor of machdep_nirq.

This revision is now accepted and ready to land.Jan 13 2021, 8:04 PM