cat /proc/interrupts
CPU0 CPU1
0: 858356378 818936397 IO-APIC-edge timer
8: 1 0 IO-APIC-edge rtc
9: 0 0 IO-APIC-level acpi
11: 0 0 IO-APIC-level ohci_hcd
15: 19 0 IO-APIC-edge ide1
177: 71976246 38927350 IO-APIC-level ioc0
185: 30 0 IO-APIC-level ioc1
193: 0 0 IO-APIC-level eth2
201: 0 0 IO-APIC-level eth3
209: 9605286 0 IO-APIC-level eth0
217: 208 408548541 IO-APIC-level eth1
NMI: 0 0
我们发现eth0基本粘在了cpu0上,而eth1基本粘在了cpu1上,通过中断号209 217来查看一下:
cat /proc/irq/217/smp_affinity
00000002
cat /proc/irq/209/smp_affinity
00000001
就是说通过修改对应中断号的文件smp_affinity,就可以将某个中断号指定到某个cpu上了; 不过该文件是内存里面的,重启机器就没有了,应该在其它地方可以修改,再研究…
更多参考: http://www.ibm.com/developerworks/cn/linux/l-cn-linuxkernelint/index.html