RE: [tip:irq/core] genirq/matrix: Improve target CPU selection for managed interrupts.

From: Michael Kelley
Date: Wed Nov 07 2018 - 13:42:03 EST


From: tip tree robot <tipbot@xxxxxxxxx> Sent: Tuesday, November 6, 2018 2:28 PM
>
> Committer: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
> CommitDate: Tue, 6 Nov 2018 23:20:13 +0100
>
> 2) Managed interrupts:
>
> Managed interrupts guarantee vector reservation when the MSI/MSI-X
> functionality of a device is enabled, which is achieved by reserving
> vectors in the bitmaps of the possible target CPUs. This reservation
> decrements the available count on each possible target CPU.
>

Thomas,

For the curious, could you elaborate on the reservation guarantee for
managed interrupts? What exactly is guaranteed? I'm trying to
understand the benefit of reserving a vector on all possible target CPUs.
I can imagine this may be to related hot-remove of CPUs, but I'm not
seeing the scenario where reserving on all possible target CPUs solves
any fundamental problem. irq_build_affinity_masks() assigns spreads
target CPUs across each IRQ in the batch, so you might get a small handful
of possible target CPUs for each IRQ. But if those small handful of CPUs
were to be hot-removed, then all the reserved vectors disappear anyway.
So maybe there's another scenario I'm missing.

Thanks,

Michael