irq-redir.rst 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. ==============================
  2. IRQ affinity on IA64 platforms
  3. ==============================
  4. 07.01.2002, Erich Focht <[email protected]>
  5. By writing to /proc/irq/IRQ#/smp_affinity the interrupt routing can be
  6. controlled. The behavior on IA64 platforms is slightly different from
  7. that described in Documentation/core-api/irq/irq-affinity.rst for i386 systems.
  8. Because of the usage of SAPIC mode and physical destination mode the
  9. IRQ target is one particular CPU and cannot be a mask of several
  10. CPUs. Only the first non-zero bit is taken into account.
  11. Usage examples
  12. ==============
  13. The target CPU has to be specified as a hexadecimal CPU mask. The
  14. first non-zero bit is the selected CPU. This format has been kept for
  15. compatibility reasons with i386.
  16. Set the delivery mode of interrupt 41 to fixed and route the
  17. interrupts to CPU #3 (logical CPU number) (2^3=0x08)::
  18. echo "8" >/proc/irq/41/smp_affinity
  19. Set the default route for IRQ number 41 to CPU 6 in lowest priority
  20. delivery mode (redirectable)::
  21. echo "r 40" >/proc/irq/41/smp_affinity
  22. The output of the command::
  23. cat /proc/irq/IRQ#/smp_affinity
  24. gives the target CPU mask for the specified interrupt vector. If the CPU
  25. mask is preceded by the character "r", the interrupt is redirectable
  26. (i.e. lowest priority mode routing is used), otherwise its route is
  27. fixed.
  28. Initialization and default behavior
  29. ===================================
  30. If the platform features IRQ redirection (info provided by SAL) all
  31. IO-SAPIC interrupts are initialized with CPU#0 as their default target
  32. and the routing is the so called "lowest priority mode" (actually
  33. fixed SAPIC mode with hint). The XTP chipset registers are used as hints
  34. for the IRQ routing. Currently in Linux XTP registers can have three
  35. values:
  36. - minimal for an idle task,
  37. - normal if any other task runs,
  38. - maximal if the CPU is going to be switched off.
  39. The IRQ is routed to the CPU with lowest XTP register value, the
  40. search begins at the default CPU. Therefore most of the interrupts
  41. will be handled by CPU #0.
  42. If the platform doesn't feature interrupt redirection IOSAPIC fixed
  43. routing is used. The target CPUs are distributed in a round robin
  44. manner. IRQs will be routed only to the selected target CPUs. Check
  45. with::
  46. cat /proc/interrupts
  47. Comments
  48. ========
  49. On large (multi-node) systems it is recommended to route the IRQs to
  50. the node to which the corresponding device is connected.
  51. For systems like the NEC AzusA we get IRQ node-affinity for free. This
  52. is because usually the chipsets on each node redirect the interrupts
  53. only to their own CPUs (as they cannot see the XTP registers on the
  54. other nodes).