Without irqbalance , intel-lpmd uses its native IRQ migration path. With a configuration containing the following states:
| State |
Active CPUs |
IRQMigrate |
ECORE_ONE_MODULE |
16-19 |
1 |
ECORE_TWO_MODULES |
12-19 |
1 |
FULL_POWER |
0-19 |
-2 (SETTING_RESTORE) |
In a multi-state cycle, IRQ affinity is restored correctly only the first time.
During the first transition to a restricted state, the native implementation saves each IRQ's original smp_affinity while irq_updated is false. After updating the IRQs, it sets irq_updated to 1.
When entering FULL_POWER, IRQMigrate=-2 selects the native restore path. native_restore_irqs() restores the cached affinities and clears the cache with memset(), but it does not reset irq_updated to 0.
Consequently, during the next low-power cycle, irq_updated is still 1, so the original IRQ affinities are not cached again. The IRQs are restricted to the selected cluster, but the following FULL_POWER transition has an empty cache and therefore restores nothing. The state machine still applies the FULL_POWER CPU configuration after processing IRQs, because process_cgroup() is called after process_irq().
For example, after the second ECORE_TWO_MODULES -> FULL_POWER transition, the system can end up in the following inconsistent state:
CPU affinity: 0-19
IRQ affinity: 12-19
If the transition passes through ECORE_ONE_MODULE, IRQ affinity may remain restricted to 16-19 instead.
Expected behavior: every FULL_POWER transition with IRQMigrate=-2 restores the IRQ affinities that existed before the corresponding low-power cycle.
Actual behavior: only the first restore succeeds; subsequent restores leave IRQ affinity restricted to the last low-power cluster.
<?xml version="1.0"?>
<Configuration>
<lp_mode_cpus></lp_mode_cpus>
<lp_mode_epp>-1</lp_mode_epp>
<Mode>1</Mode>
<PerformanceDef>-1</PerformanceDef>
<BalancedDef>0</BalancedDef>
<PowersaverDef>1</PowersaverDef>
<HfiLpmEnable>0</HfiLpmEnable>
<WLTHintEnable>0</WLTHintEnable>
<util_entry_threshold>10</util_entry_threshold>
<util_exit_threshold>95</util_exit_threshold>
<IgnoreITMT>1</IgnoreITMT>
<States>
<CPUFamily>6</CPUFamily>
<CPUModel>186</CPUModel>
<CPUConfig>*</CPUConfig>
<State>
<ID>1</ID>
<Name>ECORE_ONE_MODULE</Name>
<EntrySystemLoadThres>2</EntrySystemLoadThres>
<EnterCPULoadThres>50</EnterCPULoadThres>
<ActiveCPUs>16-19</ActiveCPUs>
<EPP>-1</EPP>
<EPB>-1</EPB>
<ITMTState>-1</ITMTState>
<IRQMigrate>1</IRQMigrate>
<MinPollInterval>500</MinPollInterval>
<PollIntervalIncrement>-1</PollIntervalIncrement>
<MaxPollInterval>2000</MaxPollInterval>
</State>
<State>
<ID>2</ID>
<Name>ECORE_TWO_MODULES</Name>
<EntrySystemLoadThres>10</EntrySystemLoadThres>
<EnterCPULoadThres>95</EnterCPULoadThres>
<ActiveCPUs>12-19</ActiveCPUs>
<EPP>-1</EPP>
<EPB>-1</EPB>
<ITMTState>-1</ITMTState>
<IRQMigrate>1</IRQMigrate>
<MinPollInterval>500</MinPollInterval>
<PollIntervalIncrement>-1</PollIntervalIncrement>
<MaxPollInterval>2000</MaxPollInterval>
</State>
<State>
<ID>3</ID>
<Name>FULL_POWER</Name>
<ActiveCPUs>0-19</ActiveCPUs>
<EPP>-1</EPP>
<EPB>-1</EPB>
<ITMTState>-1</ITMTState>
<IRQMigrate>-2</IRQMigrate>
<MinPollInterval>500</MinPollInterval>
<PollIntervalIncrement>-1</PollIntervalIncrement>
<MaxPollInterval>2000</MaxPollInterval>
</State>
</States>
</Configuration>
Without
irqbalance, intel-lpmd uses its native IRQ migration path. With a configuration containing the following states:IRQMigrateECORE_ONE_MODULE16-191ECORE_TWO_MODULES12-191FULL_POWER0-19-2(SETTING_RESTORE)In a multi-state cycle, IRQ affinity is restored correctly only the first time.
During the first transition to a restricted state, the native implementation saves each IRQ's original
smp_affinitywhileirq_updatedis false. After updating the IRQs, it setsirq_updatedto1.When entering
FULL_POWER,IRQMigrate=-2selects the native restore path.native_restore_irqs()restores the cached affinities and clears the cache withmemset(), but it does not resetirq_updatedto0.Consequently, during the next low-power cycle,
irq_updatedis still1, so the original IRQ affinities are not cached again. The IRQs are restricted to the selected cluster, but the followingFULL_POWERtransition has an empty cache and therefore restores nothing. The state machine still applies theFULL_POWERCPU configuration after processing IRQs, becauseprocess_cgroup()is called afterprocess_irq().For example, after the second
ECORE_TWO_MODULES -> FULL_POWERtransition, the system can end up in the following inconsistent state:If the transition passes through
ECORE_ONE_MODULE, IRQ affinity may remain restricted to16-19instead.Expected behavior: every
FULL_POWERtransition withIRQMigrate=-2restores the IRQ affinities that existed before the corresponding low-power cycle.Actual behavior: only the first restore succeeds; subsequent restores leave IRQ affinity restricted to the last low-power cluster.