sphinx.addnodesdocument)}( rawsourcechildren]( translations LanguagesNode)}(hhh](h pending_xref)}(hhh]docutils.nodesTextChinese (Simplified)}parenthsba attributes}(ids]classes]names]dupnames]backrefs] refdomainstdreftypedoc reftarget(/translations/zh_CN/trace/osnoise-tracermodnameN classnameN refexplicitutagnamehhh ubh)}(hhh]hChinese (Traditional)}hh2sbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget(/translations/zh_TW/trace/osnoise-tracermodnameN classnameN refexplicituh1hhh ubh)}(hhh]hItalian}hhFsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget(/translations/it_IT/trace/osnoise-tracermodnameN classnameN refexplicituh1hhh ubh)}(hhh]hJapanese}hhZsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget(/translations/ja_JP/trace/osnoise-tracermodnameN classnameN refexplicituh1hhh ubh)}(hhh]hKorean}hhnsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget(/translations/ko_KR/trace/osnoise-tracermodnameN classnameN refexplicituh1hhh ubh)}(hhh]hSpanish}hhsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget(/translations/sp_SP/trace/osnoise-tracermodnameN classnameN refexplicituh1hhh ubeh}(h]h ]h"]h$]h&]current_languageEnglishuh1h hh _documenthsourceNlineNubhsection)}(hhh](htitle)}(hOSNOISE Tracerh]hOSNOISE Tracer}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhB/var/lib/git/docbuild/linux/Documentation/trace/osnoise-tracer.rsthKubh paragraph)}(hXyIn the context of high-performance computing (HPC), the Operating System Noise (*osnoise*) refers to the interference experienced by an application due to activities inside the operating system. In the context of Linux, NMIs, IRQs, SoftIRQs, and any other system thread can cause noise to the system. Moreover, hardware-related jobs can also cause noise, for example, via SMIs.h](hPIn the context of high-performance computing (HPC), the Operating System Noise (}(hhhhhNhNubhemphasis)}(h *osnoise*h]hosnoise}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhubhX ) refers to the interference experienced by an application due to activities inside the operating system. In the context of Linux, NMIs, IRQs, SoftIRQs, and any other system thread can cause noise to the system. Moreover, hardware-related jobs can also cause noise, for example, via SMIs.}(hhhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh)}(hghwlat_detector is one of the tools used to identify the most complex source of noise: *hardware noise*.h](hVhwlat_detector is one of the tools used to identify the most complex source of noise: }(hhhhhNhNubh)}(h*hardware noise*h]hhardware noise}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhubh.}(hhhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK hhhhubh)}(hXIn a nutshell, the hwlat_detector creates a thread that runs periodically for a given period. At the beginning of a period, the thread disables interrupt and starts sampling. While running, the hwlatd thread reads the time in a loop. As interrupts are disabled, threads, IRQs, and SoftIRQs cannot interfere with the hwlatd thread. Hence, the cause of any gap between two different reads of the time roots either on NMI or in the hardware itself. At the end of the period, hwlatd enables interrupts and reports the max observed gap between the reads. It also prints a NMI occurrence counter. If the output does not report NMI executions, the user can conclude that the hardware is the culprit for the latency. The hwlat detects the NMI execution by observing the entry and exit of a NMI.h]hXIn a nutshell, the hwlat_detector creates a thread that runs periodically for a given period. At the beginning of a period, the thread disables interrupt and starts sampling. While running, the hwlatd thread reads the time in a loop. As interrupts are disabled, threads, IRQs, and SoftIRQs cannot interfere with the hwlatd thread. Hence, the cause of any gap between two different reads of the time roots either on NMI or in the hardware itself. At the end of the period, hwlatd enables interrupts and reports the max observed gap between the reads. It also prints a NMI occurrence counter. If the output does not report NMI executions, the user can conclude that the hardware is the culprit for the latency. The hwlat detects the NMI execution by observing the entry and exit of a NMI.}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh)}(hXThe osnoise tracer leverages the hwlat_detector by running a similar loop with preemption, SoftIRQs and IRQs enabled, thus allowing all the sources of *osnoise* during its execution. Using the same approach of hwlat, osnoise takes note of the entry and exit point of any source of interferences, increasing a per-cpu interference counter. The osnoise tracer also saves an interference counter for each source of interference. The interference counter for NMI, IRQs, SoftIRQs, and threads is increased anytime the tool observes these interferences' entry events. When a noise happens without any interference from the operating system level, the hardware noise counter increases, pointing to a hardware-related noise. In this way, osnoise can account for any source of interference. At the end of the period, the osnoise tracer prints the sum of all noise, the max single noise, the percentage of CPU available for the thread, and the counters for the noise sources.h](hThe osnoise tracer leverages the hwlat_detector by running a similar loop with preemption, SoftIRQs and IRQs enabled, thus allowing all the sources of }(hj hhhNhNubh)}(h *osnoise*h]hosnoise}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj ubhX' during its execution. Using the same approach of hwlat, osnoise takes note of the entry and exit point of any source of interferences, increasing a per-cpu interference counter. The osnoise tracer also saves an interference counter for each source of interference. The interference counter for NMI, IRQs, SoftIRQs, and threads is increased anytime the tool observes these interferences’ entry events. When a noise happens without any interference from the operating system level, the hardware noise counter increases, pointing to a hardware-related noise. In this way, osnoise can account for any source of interference. At the end of the period, the osnoise tracer prints the sum of all noise, the max single noise, the percentage of CPU available for the thread, and the counters for the noise sources.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh)}(hhh](h)}(hUsageh]hUsage}(hj,hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj)hhhhhK,ubh)}(h}Write the ASCII text "osnoise" into the current_tracer file of the tracing system (generally mounted at /sys/kernel/tracing).h]hWrite the ASCII text “osnoise” into the current_tracer file of the tracing system (generally mounted at /sys/kernel/tracing).}(hj:hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK.hj)hhubh)}(h For example::h]h For example:}(hjHhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK1hj)hhubh literal_block)}(hW[root@f32 ~]# cd /sys/kernel/tracing/ [root@f32 tracing]# echo osnoise > current_tracerh]hW[root@f32 ~]# cd /sys/kernel/tracing/ [root@f32 tracing]# echo osnoise > current_tracer}hjXsbah}(h]h ]h"]h$]h&] xml:spacepreserveuh1jVhhhK3hj)hhubh)}(h>It is possible to follow the trace by reading the trace file::h]h=It is possible to follow the trace by reading the trace file:}(hjhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK6hj)hhubjW)}(hX[root@f32 tracing]# cat trace # tracer: osnoise # # _-----=> irqs-off # / _----=> need-resched # | / _---=> hardirq/softirq # || / _--=> preempt-depth MAX # || / SINGLE Interference counters: # |||| RUNTIME NOISE % OF CPU NOISE +-----------------------------+ # TASK-PID CPU# |||| TIMESTAMP IN US IN US AVAILABLE IN US HW NMI IRQ SIRQ THREAD # | | | |||| | | | | | | | | | | <...>-859 [000] .... 81.637220: 1000000 190 99.98100 9 18 0 1007 18 1 <...>-860 [001] .... 81.638154: 1000000 656 99.93440 74 23 0 1006 16 3 <...>-861 [002] .... 81.638193: 1000000 5675 99.43250 202 6 0 1013 25 21 <...>-862 [003] .... 81.638242: 1000000 125 99.98750 45 1 0 1011 23 0 <...>-863 [004] .... 81.638260: 1000000 1721 99.82790 168 7 0 1002 49 41 <...>-864 [005] .... 81.638286: 1000000 263 99.97370 57 6 0 1006 26 2 <...>-865 [006] .... 81.638302: 1000000 109 99.98910 21 3 0 1006 18 1 <...>-866 [007] .... 81.638326: 1000000 7816 99.21840 107 8 0 1016 39 19h]hX[root@f32 tracing]# cat trace # tracer: osnoise # # _-----=> irqs-off # / _----=> need-resched # | / _---=> hardirq/softirq # || / _--=> preempt-depth MAX # || / SINGLE Interference counters: # |||| RUNTIME NOISE % OF CPU NOISE +-----------------------------+ # TASK-PID CPU# |||| TIMESTAMP IN US IN US AVAILABLE IN US HW NMI IRQ SIRQ THREAD # | | | |||| | | | | | | | | | | <...>-859 [000] .... 81.637220: 1000000 190 99.98100 9 18 0 1007 18 1 <...>-860 [001] .... 81.638154: 1000000 656 99.93440 74 23 0 1006 16 3 <...>-861 [002] .... 81.638193: 1000000 5675 99.43250 202 6 0 1013 25 21 <...>-862 [003] .... 81.638242: 1000000 125 99.98750 45 1 0 1011 23 0 <...>-863 [004] .... 81.638260: 1000000 1721 99.82790 168 7 0 1002 49 41 <...>-864 [005] .... 81.638286: 1000000 263 99.97370 57 6 0 1006 26 2 <...>-865 [006] .... 81.638302: 1000000 109 99.98910 21 3 0 1006 18 1 <...>-866 [007] .... 81.638326: 1000000 7816 99.21840 107 8 0 1016 39 19}hjvsbah}(h]h ]h"]h$]h&]jfjguh1jVhhhK8hj)hhubh)}(hIn addition to the regular trace fields (from TASK-PID to TIMESTAMP), the tracer prints a message at the end of each period for each CPU that is running an osnoise/ thread. The osnoise specific fields report:h]hIn addition to the regular trace fields (from TASK-PID to TIMESTAMP), the tracer prints a message at the end of each period for each CPU that is running an osnoise/ thread. The osnoise specific fields report:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKLhj)hhubh block_quote)}(hXC- The RUNTIME IN US reports the amount of time in microseconds that the osnoise thread kept looping reading the time. - The NOISE IN US reports the sum of noise in microseconds observed by the osnoise tracer during the associated runtime. - The % OF CPU AVAILABLE reports the percentage of CPU available for the osnoise thread during the runtime window. - The MAX SINGLE NOISE IN US reports the maximum single noise observed during the runtime window. - The Interference counters display how many each of the respective interference happened during the runtime window. h]h bullet_list)}(hhh](h list_item)}(hsThe RUNTIME IN US reports the amount of time in microseconds that the osnoise thread kept looping reading the time.h]h)}(hsThe RUNTIME IN US reports the amount of time in microseconds that the osnoise thread kept looping reading the time.h]hsThe RUNTIME IN US reports the amount of time in microseconds that the osnoise thread kept looping reading the time.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKPhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hvThe NOISE IN US reports the sum of noise in microseconds observed by the osnoise tracer during the associated runtime.h]h)}(hvThe NOISE IN US reports the sum of noise in microseconds observed by the osnoise tracer during the associated runtime.h]hvThe NOISE IN US reports the sum of noise in microseconds observed by the osnoise tracer during the associated runtime.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKRhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hpThe % OF CPU AVAILABLE reports the percentage of CPU available for the osnoise thread during the runtime window.h]h)}(hpThe % OF CPU AVAILABLE reports the percentage of CPU available for the osnoise thread during the runtime window.h]hpThe % OF CPU AVAILABLE reports the percentage of CPU available for the osnoise thread during the runtime window.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKThjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(h_The MAX SINGLE NOISE IN US reports the maximum single noise observed during the runtime window.h]h)}(h_The MAX SINGLE NOISE IN US reports the maximum single noise observed during the runtime window.h]h_The MAX SINGLE NOISE IN US reports the maximum single noise observed during the runtime window.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKVhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hsThe Interference counters display how many each of the respective interference happened during the runtime window. h]h)}(hrThe Interference counters display how many each of the respective interference happened during the runtime window.h]hrThe Interference counters display how many each of the respective interference happened during the runtime window.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKXhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]bullet-uh1jhhhKPhjubah}(h]h ]h"]h$]h&]uh1jhhhKPhj)hhubh)}(hNote that the example above shows a high number of HW noise samples. The reason being is that this sample was taken on a virtual machine, and the host interference is detected as a hardware interference.h]hNote that the example above shows a high number of HW noise samples. The reason being is that this sample was taken on a virtual machine, and the host interference is detected as a hardware interference.}(hj%hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK[hj)hhubeh}(h]usageah ]h"]usageah$]h&]uh1hhhhhhhhK,ubh)}(hhh](h)}(hTracer Configurationh]hTracer Configuration}(hj>hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj;hhhhhK`ubh)}(hGThe tracer has a set of options inside the osnoise directory, they are:h]hGThe tracer has a set of options inside the osnoise directory, they are:}(hjLhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKbhj;hhubj)}(hX- osnoise/cpus: CPUs at which a osnoise thread will execute. - osnoise/period_us: the period of the osnoise thread. - osnoise/runtime_us: how long an osnoise thread will look for noise. - osnoise/stop_tracing_us: stop the system tracing if a single noise higher than the configured value happens. Writing 0 disables this option. - osnoise/stop_tracing_total_us: stop the system tracing if total noise higher than the configured value happens. Writing 0 disables this option. - tracing_threshold: the minimum delta between two time() reads to be considered as noise, in us. When set to 0, the default value will be used, which is currently 1 us. - osnoise/options: a set of on/off options that can be enabled by writing the option name to the file or disabled by writing the option name preceded with the 'NO\_' prefix. For example, writing NO_OSNOISE_WORKLOAD disables the OSNOISE_WORKLOAD option. The special DEAFAULTS option resets all options to the default value. h]j)}(hhh](j)}(h:osnoise/cpus: CPUs at which a osnoise thread will execute.h]h)}(hjch]h:osnoise/cpus: CPUs at which a osnoise thread will execute.}(hjehhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKdhjaubah}(h]h ]h"]h$]h&]uh1jhj^ubj)}(h4osnoise/period_us: the period of the osnoise thread.h]h)}(hjzh]h4osnoise/period_us: the period of the osnoise thread.}(hj|hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKehjxubah}(h]h ]h"]h$]h&]uh1jhj^ubj)}(hCosnoise/runtime_us: how long an osnoise thread will look for noise.h]h)}(hjh]hCosnoise/runtime_us: how long an osnoise thread will look for noise.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKfhjubah}(h]h ]h"]h$]h&]uh1jhj^ubj)}(hosnoise/stop_tracing_us: stop the system tracing if a single noise higher than the configured value happens. Writing 0 disables this option.h]h)}(hosnoise/stop_tracing_us: stop the system tracing if a single noise higher than the configured value happens. Writing 0 disables this option.h]hosnoise/stop_tracing_us: stop the system tracing if a single noise higher than the configured value happens. Writing 0 disables this option.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKghjubah}(h]h ]h"]h$]h&]uh1jhj^ubj)}(hosnoise/stop_tracing_total_us: stop the system tracing if total noise higher than the configured value happens. Writing 0 disables this option.h]h)}(hosnoise/stop_tracing_total_us: stop the system tracing if total noise higher than the configured value happens. Writing 0 disables this option.h]hosnoise/stop_tracing_total_us: stop the system tracing if total noise higher than the configured value happens. Writing 0 disables this option.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKjhjubah}(h]h ]h"]h$]h&]uh1jhj^ubj)}(htracing_threshold: the minimum delta between two time() reads to be considered as noise, in us. When set to 0, the default value will be used, which is currently 1 us.h]h)}(htracing_threshold: the minimum delta between two time() reads to be considered as noise, in us. When set to 0, the default value will be used, which is currently 1 us.h]htracing_threshold: the minimum delta between two time() reads to be considered as noise, in us. When set to 0, the default value will be used, which is currently 1 us.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKmhjubah}(h]h ]h"]h$]h&]uh1jhj^ubj)}(hXAosnoise/options: a set of on/off options that can be enabled by writing the option name to the file or disabled by writing the option name preceded with the 'NO\_' prefix. For example, writing NO_OSNOISE_WORKLOAD disables the OSNOISE_WORKLOAD option. The special DEAFAULTS option resets all options to the default value. h]h)}(hX@osnoise/options: a set of on/off options that can be enabled by writing the option name to the file or disabled by writing the option name preceded with the 'NO\_' prefix. For example, writing NO_OSNOISE_WORKLOAD disables the OSNOISE_WORKLOAD option. The special DEAFAULTS option resets all options to the default value.h]hXDosnoise/options: a set of on/off options that can be enabled by writing the option name to the file or disabled by writing the option name preceded with the ‘NO_’ prefix. For example, writing NO_OSNOISE_WORKLOAD disables the OSNOISE_WORKLOAD option. The special DEAFAULTS option resets all options to the default value.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKphjubah}(h]h ]h"]h$]h&]uh1jhj^ubeh}(h]h ]h"]h$]h&]jjuh1jhhhKdhjZubah}(h]h ]h"]h$]h&]uh1jhhhKdhj;hhubeh}(h]tracer-configurationah ]h"]tracer configurationah$]h&]uh1hhhhhhhhK`ubh)}(hhh](h)}(hTracer Optionsh]hTracer Options}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKwubh)}(hqThe osnoise/options file exposes a set of on/off configuration options for the osnoise tracer. These options are:h]hqThe osnoise/options file exposes a set of on/off configuration options for the osnoise tracer. These options are:}(hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKyhjhhubj)}(hX- DEFAULTS: reset the options to the default value. - OSNOISE_WORKLOAD: do not dispatch osnoise workload (see dedicated section below). - PANIC_ON_STOP: call panic() if the tracer stops. This option serves to capture a vmcore. - OSNOISE_PREEMPT_DISABLE: disable preemption while running the osnoise workload, allowing only IRQ and hardware-related noise. - OSNOISE_IRQ_DISABLE: disable IRQs while running the osnoise workload, allowing only NMIs and hardware-related noise, like hwlat tracer. h]j)}(hhh](j)}(h1DEFAULTS: reset the options to the default value.h]h)}(hjBh]h1DEFAULTS: reset the options to the default value.}(hjDhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK|hj@ubah}(h]h ]h"]h$]h&]uh1jhj=ubj)}(hQOSNOISE_WORKLOAD: do not dispatch osnoise workload (see dedicated section below).h]h)}(hQOSNOISE_WORKLOAD: do not dispatch osnoise workload (see dedicated section below).h]hQOSNOISE_WORKLOAD: do not dispatch osnoise workload (see dedicated section below).}(hj[hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK}hjWubah}(h]h ]h"]h$]h&]uh1jhj=ubj)}(hXPANIC_ON_STOP: call panic() if the tracer stops. This option serves to capture a vmcore.h]h)}(hXPANIC_ON_STOP: call panic() if the tracer stops. This option serves to capture a vmcore.h]hXPANIC_ON_STOP: call panic() if the tracer stops. This option serves to capture a vmcore.}(hjshhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjoubah}(h]h ]h"]h$]h&]uh1jhj=ubj)}(h}OSNOISE_PREEMPT_DISABLE: disable preemption while running the osnoise workload, allowing only IRQ and hardware-related noise.h]h)}(h}OSNOISE_PREEMPT_DISABLE: disable preemption while running the osnoise workload, allowing only IRQ and hardware-related noise.h]h}OSNOISE_PREEMPT_DISABLE: disable preemption while running the osnoise workload, allowing only IRQ and hardware-related noise.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhj=ubj)}(hOSNOISE_IRQ_DISABLE: disable IRQs while running the osnoise workload, allowing only NMIs and hardware-related noise, like hwlat tracer. h]h)}(hOSNOISE_IRQ_DISABLE: disable IRQs while running the osnoise workload, allowing only NMIs and hardware-related noise, like hwlat tracer.h]hOSNOISE_IRQ_DISABLE: disable IRQs while running the osnoise workload, allowing only NMIs and hardware-related noise, like hwlat tracer.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhj=ubeh}(h]h ]h"]h$]h&]jjuh1jhhhK|hj9ubah}(h]h ]h"]h$]h&]uh1jhhhK|hjhhubeh}(h]tracer-optionsah ]h"]tracer optionsah$]h&]uh1hhhhhhhhKwubh)}(hhh](h)}(hAdditional Tracingh]hAdditional Tracing}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKubh)}(hrIn addition to the tracer, a set of tracepoints were added to facilitate the identification of the osnoise source.h]hrIn addition to the tracer, a set of tracepoints were added to facilitate the identification of the osnoise source.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubj)}(hXo- osnoise:sample_threshold: printed anytime a noise is higher than the configurable tolerance_ns. - osnoise:nmi_noise: noise from NMI, including the duration. - osnoise:irq_noise: noise from an IRQ, including the duration. - osnoise:softirq_noise: noise from a SoftIRQ, including the duration. - osnoise:thread_noise: noise from a thread, including the duration. h]j)}(hhh](j)}(h_osnoise:sample_threshold: printed anytime a noise is higher than the configurable tolerance_ns.h]h)}(h_osnoise:sample_threshold: printed anytime a noise is higher than the configurable tolerance_ns.h]h_osnoise:sample_threshold: printed anytime a noise is higher than the configurable tolerance_ns.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(h:osnoise:nmi_noise: noise from NMI, including the duration.h]h)}(hj h]h:osnoise:nmi_noise: noise from NMI, including the duration.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1jhjubj)}(h=osnoise:irq_noise: noise from an IRQ, including the duration.h]h)}(hj"h]h=osnoise:irq_noise: noise from an IRQ, including the duration.}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hDosnoise:softirq_noise: noise from a SoftIRQ, including the duration.h]h)}(hDosnoise:softirq_noise: noise from a SoftIRQ, including the duration.h]hDosnoise:softirq_noise: noise from a SoftIRQ, including the duration.}(hj;hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj7ubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hCosnoise:thread_noise: noise from a thread, including the duration. h]h)}(hBosnoise:thread_noise: noise from a thread, including the duration.h]hBosnoise:thread_noise: noise from a thread, including the duration.}(hjShhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjOubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]jjuh1jhhhKhjubah}(h]h ]h"]h$]h&]uh1jhhhKhjhhubh)}(hXNote that all the values are *net values*. For example, if while osnoise is running, another thread preempts the osnoise thread, it will start a thread_noise duration at the start. Then, an IRQ takes place, preempting the thread_noise, starting a irq_noise. When the IRQ ends its execution, it will compute its duration, and this duration will be subtracted from the thread_noise, in such a way as to avoid the double accounting of the IRQ execution. This logic is valid for all sources of noise.h](hNote that all the values are }(hjshhhNhNubh)}(h *net values*h]h net values}(hj{hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjsubhX. For example, if while osnoise is running, another thread preempts the osnoise thread, it will start a thread_noise duration at the start. Then, an IRQ takes place, preempting the thread_noise, starting a irq_noise. When the IRQ ends its execution, it will compute its duration, and this duration will be subtracted from the thread_noise, in such a way as to avoid the double accounting of the IRQ execution. This logic is valid for all sources of noise.}(hjshhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(h7Here is one example of the usage of these tracepoints::h]h6Here is one example of the usage of these tracepoints:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubjW)}(hX osnoise/8-961 [008] d.h. 5789.857532: irq_noise: local_timer:236 start 5789.857529929 duration 1845 ns osnoise/8-961 [008] dNh. 5789.858408: irq_noise: local_timer:236 start 5789.858404871 duration 2848 ns migration/8-54 [008] d... 5789.858413: thread_noise: migration/8:54 start 5789.858409300 duration 3068 ns osnoise/8-961 [008] .... 5789.858413: sample_threshold: start 5789.858404555 duration 8812 ns interferences 2h]hX osnoise/8-961 [008] d.h. 5789.857532: irq_noise: local_timer:236 start 5789.857529929 duration 1845 ns osnoise/8-961 [008] dNh. 5789.858408: irq_noise: local_timer:236 start 5789.858404871 duration 2848 ns migration/8-54 [008] d... 5789.858413: thread_noise: migration/8:54 start 5789.858409300 duration 3068 ns osnoise/8-961 [008] .... 5789.858413: sample_threshold: start 5789.858404555 duration 8812 ns interferences 2}hjsbah}(h]h ]h"]h$]h&]jfjguh1jVhhhKhjhhubh)}(hXCIn this example, a noise sample of 8 microseconds was reported in the last line, pointing to two interferences. Looking backward in the trace, the two previous entries were about the migration thread running after a timer IRQ execution. The first event is not part of the noise because it took place one millisecond before.h]hXCIn this example, a noise sample of 8 microseconds was reported in the last line, pointing to two interferences. Looking backward in the trace, the two previous entries were about the migration thread running after a timer IRQ execution. The first event is not part of the noise because it took place one millisecond before.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(hX>It is worth noticing that the sum of the duration reported in the tracepoints is smaller than eight us reported in the sample_threshold. The reason roots in the overhead of the entry and exit code that happens before and after any interference execution. This justifies the dual approach: measuring thread and tracing.h]hX>It is worth noticing that the sum of the duration reported in the tracepoints is smaller than eight us reported in the sample_threshold. The reason roots in the overhead of the entry and exit code that happens before and after any interference execution. This justifies the dual approach: measuring thread and tracing.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubeh}(h]additional-tracingah ]h"]additional tracingah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(h'Running osnoise tracer without workloadh]h'Running osnoise tracer without workload}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKubh)}(hBy enabling the osnoise tracer with the NO_OSNOISE_WORKLOAD option set, the osnoise: tracepoints serve to measure the execution time of any type of Linux task, free from the interference of other tasks.h]hBy enabling the osnoise tracer with the NO_OSNOISE_WORKLOAD option set, the osnoise: tracepoints serve to measure the execution time of any type of Linux task, free from the interference of other tasks.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubeh}(h]'running-osnoise-tracer-without-workloadah ]h"]'running osnoise tracer without workloadah$]h&]uh1hhhhhhhhKubeh}(h]osnoise-tracerah ]h"]osnoise tracerah$]h&]uh1hhhhhhhhKubeh}(h]h ]h"]h$]h&]sourcehuh1hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(hN generatorN datestampN source_linkN source_urlN toc_backlinksentryfootnote_backlinksK sectnum_xformKstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerj%error_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeenrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourceh _destinationN _config_files]7/var/lib/git/docbuild/linux/Documentation/docutils.confafile_insertion_enabled raw_enabledKline_length_limitM'pep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacesyntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformKsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_linkenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}refids}nameids}(jjj8j5jjjjjjjju nametypes}(jj8jjjjuh}(jhj5j)jj;jjjjjju footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}Rparse_messages]transform_messages] transformerN include_log] decorationNhhub.