Re: [PATCH 01/12] genirq: Restrict effective affinity to single-target interrupts

From: Thomas Gleixner
Date: Tue Aug 15 2017 - 08:02:05 EST


On Tue, 15 Aug 2017, Marc Zyngier wrote:

> Just because CONFIG_GENERIC_IRQ_EFFECTIVE_AFF_MASK is selected
> doesn't mean that all the interrupts are using the effective
> affinity mask. For a number of them, this mask is likely to
> be empty.
>
> In order to deal with this, let's restrict the use of the
> effective affinity mask to these interrupts that have been
> configured as "single target".

That's actually wrong. On X86 we have other restrictions, i.e. groups of
CPUs which are a subset of the affinity mask.

The point of the effective mask is to see to which CPU(s) a particular
interrupt is effectively routed. This is always a subset of the affinity
mask which is either the boot default or set by the admin.

So what you really want is to check whether the effective mask is
empty. That's an indicator that the underlying irq chip does not update the
effective mask.

The single target bit is an optimization for the hotplug case. If its set,
then we can avoid to reconfigure the affinity for that interrupt because it
either would not change or pointlessly be redirected to another single CPU
in the valid set.

Thanks,

tglx