IRQ-redir.txt 2.5 KB

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