rtla-hwnoise.rst 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. .. SPDX-License-Identifier: GPL-2.0
  2. ============
  3. rtla-hwnoise
  4. ============
  5. ------------------------------------------
  6. Detect and quantify hardware-related noise
  7. ------------------------------------------
  8. :Manual section: 1
  9. SYNOPSIS
  10. ========
  11. **rtla hwnoise** [*OPTIONS*]
  12. DESCRIPTION
  13. ===========
  14. **rtla hwnoise** collects the periodic summary from the *osnoise* tracer
  15. running with *interrupts disabled*. By disabling interrupts, and the scheduling
  16. of threads as a consequence, only non-maskable interrupts and hardware-related
  17. noise is allowed.
  18. The tool also allows the configurations of the *osnoise* tracer and the
  19. collection of the tracer output.
  20. OPTIONS
  21. =======
  22. .. include:: common_osnoise_options.rst
  23. .. include:: common_top_options.rst
  24. .. include:: common_options.rst
  25. EXAMPLE
  26. =======
  27. In the example below, the **rtla hwnoise** tool is set to run on CPUs *1-7*
  28. on a system with 8 cores/16 threads with hyper-threading enabled.
  29. The tool is set to detect any noise higher than *one microsecond*,
  30. to run for *ten minutes*, displaying a summary of the report at the
  31. end of the session::
  32. # rtla hwnoise -c 1-7 -T 1 -d 10m -q
  33. Hardware-related Noise
  34. duration: 0 00:10:00 | time is in us
  35. CPU Period Runtime Noise % CPU Aval Max Noise Max Single HW NMI
  36. 1 #599 599000000 138 99.99997 3 3 4 74
  37. 2 #599 599000000 85 99.99998 3 3 4 75
  38. 3 #599 599000000 86 99.99998 4 3 6 75
  39. 4 #599 599000000 81 99.99998 4 4 2 75
  40. 5 #599 599000000 85 99.99998 2 2 2 75
  41. 6 #599 599000000 76 99.99998 2 2 0 75
  42. 7 #599 599000000 77 99.99998 3 3 0 75
  43. The first column shows the *CPU*, and the second column shows how many
  44. *Periods* the tool ran during the session. The *Runtime* is the time
  45. the tool effectively runs on the CPU. The *Noise* column is the sum of
  46. all noise that the tool observed, and the *% CPU Aval* is the relation
  47. between the *Runtime* and *Noise*.
  48. The *Max Noise* column is the maximum hardware noise the tool detected in a
  49. single period, and the *Max Single* is the maximum single noise seen.
  50. The *HW* and *NMI* columns show the total number of *hardware* and *NMI* noise
  51. occurrence observed by the tool.
  52. For example, *CPU 3* ran *599* periods of *1 second Runtime*. The CPU received
  53. *86 us* of noise during the entire execution, leaving *99.99997 %* of CPU time
  54. for the application. In the worst single period, the CPU caused *4 us* of
  55. noise to the application, but it was certainly caused by more than one single
  56. noise, as the *Max Single* noise was of *3 us*. The CPU has *HW noise,* at a
  57. rate of *six occurrences*/*ten minutes*. The CPU also has *NMIs*, at a higher
  58. frequency: around *seven per second*.
  59. The tool should report *0* hardware-related noise in the ideal situation.
  60. For example, by disabling hyper-threading to remove the hardware noise,
  61. and disabling the TSC watchdog to remove the NMI (it is possible to identify
  62. this using tracing options of **rtla hwnoise**), it was possible to reach
  63. the ideal situation in the same hardware::
  64. # rtla hwnoise -c 1-7 -T 1 -d 10m -q
  65. Hardware-related Noise
  66. duration: 0 00:10:00 | time is in us
  67. CPU Period Runtime Noise % CPU Aval Max Noise Max Single HW NMI
  68. 1 #599 599000000 0 100.00000 0 0 0 0
  69. 2 #599 599000000 0 100.00000 0 0 0 0
  70. 3 #599 599000000 0 100.00000 0 0 0 0
  71. 4 #599 599000000 0 100.00000 0 0 0 0
  72. 5 #599 599000000 0 100.00000 0 0 0 0
  73. 6 #599 599000000 0 100.00000 0 0 0 0
  74. 7 #599 599000000 0 100.00000 0 0 0 0
  75. SEE ALSO
  76. ========
  77. **rtla-osnoise**\(1)
  78. Osnoise tracer documentation: <https://www.kernel.org/doc/html/latest/trace/osnoise-tracer.html>
  79. AUTHOR
  80. ======
  81. Written by Daniel Bristot de Oliveira <bristot@kernel.org>
  82. .. include:: common_appendix.rst