rtla-hwnoise.rst 4.6 KB

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