====== Proc - IRQ Vectors ======
IRQ vectors are displayed only when relevent. For example, the threshold vector does not exist on **x86_64** platforms. Others are suppressed when the system is a uniprocessor. As of this writing, only i386 and x86_64 platforms support the new IRQ vector displays.
Of some interest is the introduction of the /proc/irq directory to 2.4. It could be used to set IRQ to CPU affinity, this means that you can "hook" an IRQ to only one CPU, or to exclude a CPU of handling IRQs. The contents of the irq subdir is one subdir for each IRQ, and two files; **default_smp_affinity** and **prof_cpu_mask**.
For example:
ls /proc/irq/
0 10 12 14 16 18 2 4 6 8 prof_cpu_mask
1 11 13 15 17 19 3 5 7 9 default_smp_affinity
ls /proc/irq/0/
smp_affinity
**smp_affinity** is a bitmask, in which you can specify which CPUs can handle the IRQ, you can set it by doing:
echo 1 > /proc/irq/10/smp_affinity
This means that only the first CPU will handle the IRQ, but you can also echo 5 which means that only the first and fourth CPU can handle the IRQ.
The contents of each smp_affinity file is the same by default:
cat /proc/irq/0/smp_affinity
ffffffff
The **default_smp_affinity** mask applies to all non-active IRQs, which are the IRQs which have not yet been allocated/activated, and hence which lack a /proc/irq/[0-9]* directory.
The node file on an SMP system shows the node to which the device using the IRQ reports itself as being attached. This hardware locality information does not include information about any possible driver locality preference.
**prof_cpu_mask** specifies which CPUs are to be profiled by the system wide profiler. Default value is **ffffffff** (all cpus).
The way IRQs are routed is handled by the IO-APIC, and it's Round Robin between all the CPUs which are allowed to handle it. As usual the kernel has more info than you and does a better job than you, so the defaults are the best choice for almost everyone.