irqbalance icon indicating copy to clipboard operation
irqbalance copied to clipboard

allow policyscript to include/exclude CPUs

Open phemmer opened this issue 1 year ago • 10 comments

Currently irqbalance has the environment variable IRQBALANCE_BANNED_CPUS (and IRQBALANCE_BANNED_CPULIST) which allows for excluding CPUs from any IRQ assignment. It would be nice if we could be more granular and only apply this to specific IRQs.

I currently have an issue with a driver when its IRQs get assigned to CPUs >= 64. While this is a problem with the driver, I wanted to temporarily work around the problem by excluding CPUs >=64 from being used on those IRQs.

Regarding whether this should be a whitelist or blacklist, matching the IRQBALANCE_BANNED_CPUS functionality would mean blacklist. However in my case, not all my systems have the same CPU count. So with a blacklist, to avoid having to count the CPUs and construct the appropriate mask, I have to provide a mask big enough to cover all the different systems' hardware. This does work, as it seems irqbalance ignores the oversized mask bits, but a whitelist might be more succinct. A whitelist would also be more inline with the existing /proc/irq/$irq/smp_affinity provided by the kernel.

So ultimately the request is to add support for an instruction to be emitted by the policy script to whitelist or blacklist (whichever is decided) CPUs for the specific IRQ indicated to the script.

phemmer avatar Dec 21 '23 15:12 phemmer