title: Does Linux automatically binds IRQs to the NUMA-nodes to which the PCIe-devices are connected?
body: <ol>
  <li>As we known, we can map IRQs of some devices to some CPU-Cores by using IRQ Affinity on Linux</li>
  </ol>
  
  <p><code>cat &lt;8-bit-core-mask&gt; /proc/irq/[irq-num]/smp_affinity</code>: </p>
  
  <ul>
  <li><a href="http://www.alexonlinux.com/smp-affinity-and-proper-interrupt-handling-in-linux" rel="nofollow noreferrer">http://www.alexonlinux.com/smp-affinity-and-proper-interrupt-handling-in-linux</a></li>
  <li><a href="https://community.mellanox.com/docs/DOC-2123" rel="nofollow noreferrer">https://community.mellanox.com/docs/DOC-2123</a></li>
  </ul>
  
  <p>Also</p>
  
  <ol start="2">
  <li>We known, that we can map IRQ (hardware-interrupts) on the some CPU-Nodes (Processors on motherboard) on NUMA-systems, by using: <a href="https://events.linuxfoundation.org/sites/events/files/eeus13_shelton.pdf" rel="nofollow noreferrer">https://events.linuxfoundation.org/sites/events/files/eeus13_shelton.pdf</a></li>
  </ol>
  
  <p><code>cat &lt;8-bit-node-mask&gt; /proc/irq/[irq-num]/node</code></p>
  
  <hr>
  
  <p>But if one PCIe-device (Ethernet, GPU, ...) connected to the NUMA-0, and other PCIe-device connected to the NUMA-1, then it would be optimal to use interrupts on those NUMA-nodes (CPU) to which these devices are connected, to avoid high latency communication between nodes: <a href="https://stackoverflow.com/questions/28307151/is-cpu-access-asymmetric-to-network-card/36706249#36706249">Is CPU access asymmetric to Network card</a></p>
  
  <p>Does Linux automatically binds IRQs to the nodes to which the PCIe-devices are connected , or does it have to be done manually?</p>
  
  <p>And if we have to do this with our hands, then what is the best way to do this?</p>
  
  <hr>
  
  <p>Particularly interested in Linux x86_64: Debian 8 (Kernel 3.16) and Red Hat Enterprise Linux 7 (Kernel 3.10), and others...</p>
  
  <p>Motherboard chipsets: Intel C612 / Intel C610, and others...</p>
  
  <p>Ethernet cards: Solarflare Flareon Ultra SFN7142Q Dual-Port 40GbE QSFP+ PCIe 3.0 Server I/O Adapter - Part ID: SFN7142Q</p>