调整中断服务的CPU

Use the IRQ number to locate the appropriate smp_affinity file:
# cat /proc/irq/32/smp_affinity
f
The default value for smp_affinity is f, meaning that the IRQ can be serviced on any of the CPUs in the system.

Setting this value to 1, as follows, means that only CPU 0 can service this interrupt:
# echo 1 >/proc/irq/32/smp_affinity
# cat /proc/irq/32/smp_affinity
1
Commas can be used to delimit smp_affinity values for discrete 32-bit groups. This is required on systems with

more than 32 cores. For example, the following example shows that IRQ 40 is serviced on all cores of a 64-core system:
# cat /proc/irq/40/smp_affinity
ffffffff,ffffffff
To service IRQ 40 on only the upper 32-cores of a 64-core system, you would do the following:
# echo 0xffffffff,00000000 > /proc/irq/40/smp_affinity
# cat /proc/irq/40/smp_affinity
ffffffff,00000000

In 10-148-45-231,  find /proc/irq/ -name smp_affinity_list -exec head -v {} \;

"

==> /proc/irq/0/smp_affinity_list <==
0-14
==> /proc/irq/1/smp_affinity_list <==
0-7
==> /proc/irq/2/smp_affinity_list <==
...
"

你可能感兴趣的:(Linux,kernel)