TransWikia.com

can't change value in smp_affinity

Unix & Linux Asked by futureishere on December 1, 2021

I am trying to set irq affinity on linux by changing the value in smp_affinity. When I echo the new value into the file, I don’t get any error but when I read it back, the value remains unchanged. I don’t have irqbalance enabled, so I am not sure what else could be preventing me from changing it.

For example:

> cat /proc/irq/51/smp_affinity   
f
> echo 1 > /proc/irq/51/smp_affinity   
> cat /proc/irq/51/smp_affinity   
f

One Answer

The device on IRQ 51 likely does not support IO-APIC. You can check this by running:

cat /proc/interrupts

I've provided some (edited) sample output below:

           CPU0       CPU1       CPU2       CPU3
  0:         31          0          0          0   IO-APIC-edge      timer
  6:          0          0          0          2   IO-APIC-edge      floppy
 51:          0          0          0          0   PCI-MSI-edge      PCIe PME, pciehp

On the example system I am able to change the smp_affinity for IRQ 6, but not for IRQ 51. (Although IRQ 0 lists IO-APIC-edge, I am unable to set the smp_affinity for that IRQ. I'm not sure why.)

From IO-APIC.txt:

Without an IO-APIC, interrupts from hardware will be delivered only to the CPU which boots the operating system (usually CPU#0).

Another helpful reference is SMP IRQ Affinity.

Answered by cherdt on December 1, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP