요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
2. 영어 원문 전체
번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
.. SPDX-License-Identifier: GPL-2.0
.. |tool| replace:: hwnoise
============
rtla-hwnoise
============
------------------------------------------
Detect and quantify hardware-related noise
------------------------------------------
:Manual section: 1
SYNOPSIS
========
**rtla hwnoise** [*OPTIONS*]
DESCRIPTION
===========
**rtla hwnoise** collects the periodic summary from the *osnoise* tracer
running with *interrupts disabled*. By disabling interrupts, and the scheduling
of threads as a consequence, only non-maskable interrupts and hardware-related
noise is allowed.
The tool also allows the configurations of the *osnoise* tracer and the
collection of the tracer output.
OPTIONS
=======
.. include:: common_osnoise_options.txt
.. include:: common_top_options.txt
.. include:: common_options.txt
EXAMPLE
=======
In the example below, the **rtla hwnoise** tool is set to run on CPUs *1-7*
on a system with 8 cores/16 threads with hyper-threading enabled.
The tool is set to detect any noise higher than *one microsecond*,
to run for *ten minutes*, displaying a summary of the report at the
end of the session::
# rtla hwnoise -c 1-7 -T 1 -d 10m -q
Hardware-related Noise
duration: 0 00:10:00 | time is in us
CPU Period Runtime Noise % CPU Aval Max Noise Max Single HW NMI
1 #599 599000000 138 99.99997 3 3 4 74
2 #599 599000000 85 99.99998 3 3 4 75
3 #599 599000000 86 99.99998 4 3 6 75
4 #599 599000000 81 99.99998 4 4 2 75
5 #599 599000000 85 99.99998 2 2 2 75
6 #599 599000000 76 99.99998 2 2 0 75
7 #599 599000000 77 99.99998 3 3 0 75
The first column shows the *CPU*, and the second column shows how many
*Periods* the tool ran during the session. The *Runtime* is the time
the tool effectively runs on the CPU. The *Noise* column is the sum of
all noise that the tool observed, and the *% CPU Aval* is the relation
between the *Runtime* and *Noise*.
The *Max Noise* column is the maximum hardware noise the tool detected in a
single period, and the *Max Single* is the maximum single noise seen.
The *HW* and *NMI* columns show the total number of *hardware* and *NMI* noise
occurrence observed by the tool.
For example, *CPU 3* ran *599* periods of *1 second Runtime*. The CPU received
*86 us* of noise during the entire execution, leaving *99.99997 %* of CPU time
for the application. In the worst single period, the CPU caused *4 us* of
noise to the application, but it was certainly caused by more than one single
noise, as the *Max Single* noise was of *3 us*. The CPU has *HW noise,* at a
rate of *six occurrences*/*ten minutes*. The CPU also has *NMIs*, at a higher
frequency: around *seven per second*.
The tool should report *0* hardware-related noise in the ideal situation.
For example, by disabling hyper-threading to remove the hardware noise,
and disabling the TSC watchdog to remove the NMI (it is possible to identify
this using tracing options of **rtla hwnoise**), it was possible to reach
the ideal situation in the same hardware::
# rtla hwnoise -c 1-7 -T 1 -d 10m -q
Hardware-related Noise
duration: 0 00:10:00 | time is in us
CPU Period Runtime Noise % CPU Aval Max Noise Max Single HW NMI
1 #599 599000000 0 100.00000 0 0 0 0
2 #599 599000000 0 100.00000 0 0 0 0
3 #599 599000000 0 100.00000 0 0 0 0
4 #599 599000000 0 100.00000 0 0 0 0
5 #599 599000000 0 100.00000 0 0 0 0
6 #599 599000000 0 100.00000 0 0 0 0
7 #599 599000000 0 100.00000 0 0 0 0
SEE ALSO
========
**rtla-osnoise**\(1)
Osnoise tracer documentation: <https://www.kernel.org/doc/html/latest/trace/osnoise-tracer.html>
AUTHOR
======
Written by Daniel Bristot de Oliveira <[email protected]>
.. include:: common_appendix.txt
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.
Interrupt를 끈 osnoise 측정
1-36`rtla hwnoise [OPTIONS]`는 manual section 1 command로, interrupt를 비활성화한 상태에서 실행되는 `osnoise` tracer의 periodic summary를 수집한다.
interrupt를 끄면 그 결과 thread scheduling도 일어나지 않으므로 실행 중 허용되는 간섭은 non-maskable interrupt(NMI)와 hardware-related noise뿐이다. 이 조건을 이용해 일반 OS noise와 hardware에서 비롯된 noise를 분리한다.
tool은 `osnoise` tracer 설정과 tracer output 수집도 지원한다. option은 `common_osnoise_options.txt`, `common_top_options.txt`, `common_options.txt`의 공통 정의를 포함한다.
mask 가능한 OS 간섭을 제거해 남은 noise를 관찰한다.
hwnoise command가 재사용하는 공통 option 집합이다.
.. SPDX-License-Identifier: GPL-2.0
.. |tool| replace:: hwnoise
============
rtla-hwnoise
============
------------------------------------------
Detect and quantify hardware-related noise
------------------------------------------
:Manual section: 1
SYNOPSIS
========
**rtla hwnoise** [*OPTIONS*]
DESCRIPTION
===========
**rtla hwnoise** collects the periodic summary from the *osnoise* tracer
running with *interrupts disabled*. By disabling interrupts, and the scheduling
of threads as a consequence, only non-maskable interrupts and hardware-related
noise is allowed.
The tool also allows the configurations of the *osnoise* tracer and the
collection of the tracer output.
OPTIONS
=======
.. include:: common_osnoise_options.txt
.. include:: common_top_options.txt
.. include:: common_options.txt
8-core/16-thread system의 10분 측정
37-59예제 system은 hyper-threading을 켠 8 core/16 thread 구성이다. `rtla hwnoise -c 1-7 -T 1 -d 10m -q`는 CPU 1-7에서 1 microsecond보다 큰 noise를 탐지하며 10분 동안 실행한 뒤 session 끝에 summary만 표시한다.
sample 출력은 CPU마다 599 period, 599,000,000 us runtime을 기록한다. 관찰 noise는 CPU별 76-138 us이고 CPU availability는 99.99997-99.99998%다. 최대 period noise는 2-4 us, 최대 single noise는 2-4 us 범위다.
command option을 측정 조건으로 해석한다.
EXAMPLE
=======
In the example below, the **rtla hwnoise** tool is set to run on CPUs *1-7*
on a system with 8 cores/16 threads with hyper-threading enabled.
The tool is set to detect any noise higher than *one microsecond*,
to run for *ten minutes*, displaying a summary of the report at the
end of the session::
# rtla hwnoise -c 1-7 -T 1 -d 10m -q
Hardware-related Noise
duration: 0 00:10:00 | time is in us
CPU Period Runtime Noise % CPU Aval Max Noise Max Single HW NMI
1 #599 599000000 138 99.99997 3 3 4 74
2 #599 599000000 85 99.99998 3 3 4 75
3 #599 599000000 86 99.99998 4 3 6 75
4 #599 599000000 81 99.99998 4 4 2 75
5 #599 599000000 85 99.99998 2 2 2 75
6 #599 599000000 76 99.99998 2 2 0 75
7 #599 599000000 77 99.99998 3 3 0 75
Report column과 CPU 3 해석
60-79첫 column은 CPU이고 두 번째 `Period`는 session 중 tool이 실행한 period 수다. `Runtime`은 해당 CPU에서 실제로 실행한 시간이고 `Noise`는 관찰한 모든 noise의 합이다. `% CPU Aval`은 runtime과 noise의 관계로 계산한 application 가용 CPU 비율이다.
`Max Noise`는 period 하나에서 탐지한 hardware noise의 최대 합이고 `Max Single`은 단일 noise event의 최댓값이다. `HW`와 `NMI`는 각각 hardware noise와 NMI noise의 총 발생 횟수다.
CPU 3은 1초 runtime의 period를 599번 실행하면서 전체 86 us noise를 받았고 application에 99.99997% CPU time을 남겼다. 최악의 period noise는 4 us지만 최대 단일 noise가 3 us이므로 그 period에는 event가 둘 이상 있었다. hardware noise는 10분에 6회, NMI는 초당 약 7회 발생했다.
summary의 각 값을 진단 질문과 연결한다.
The first column shows the *CPU*, and the second column shows how many
*Periods* the tool ran during the session. The *Runtime* is the time
the tool effectively runs on the CPU. The *Noise* column is the sum of
all noise that the tool observed, and the *% CPU Aval* is the relation
between the *Runtime* and *Noise*.
The *Max Noise* column is the maximum hardware noise the tool detected in a
single period, and the *Max Single* is the maximum single noise seen.
The *HW* and *NMI* columns show the total number of *hardware* and *NMI* noise
occurrence observed by the tool.
For example, *CPU 3* ran *599* periods of *1 second Runtime*. The CPU received
*86 us* of noise during the entire execution, leaving *99.99997 %* of CPU time
for the application. In the worst single period, the CPU caused *4 us* of
noise to the application, but it was certainly caused by more than one single
noise, as the *Max Single* noise was of *3 us*. The CPU has *HW noise,* at a
rate of *six occurrences*/*ten minutes*. The CPU also has *NMIs*, at a higher
frequency: around *seven per second*.
Noise 0의 이상적 상태와 참고 자료
80-109이상적인 상황에서 tool은 hardware-related noise를 0으로 보고해야 한다. 같은 hardware에서 hyper-threading을 꺼 hardware noise를 제거하고 TSC watchdog을 꺼 NMI를 제거하면 모든 CPU의 Noise, Max Noise, Max Single, HW, NMI가 0이고 CPU availability가 100%인 결과를 얻을 수 있다.
어떤 NMI가 발생하는지는 `rtla hwnoise` tracing option으로 식별할 수 있다. 관련 자료는 `rtla-osnoise(1)`과 osnoise tracer documentation이다.
문서는 Daniel Bristot de Oliveira가 작성했으며 공통 appendix에서 exit status, bug reporting, license와 copyright를 포함한다.
원인을 분리한 뒤 같은 측정을 반복한다.
모든 측정 CPU에서 기대하는 값이다.
The tool should report *0* hardware-related noise in the ideal situation.
For example, by disabling hyper-threading to remove the hardware noise,
and disabling the TSC watchdog to remove the NMI (it is possible to identify
this using tracing options of **rtla hwnoise**), it was possible to reach
the ideal situation in the same hardware::
# rtla hwnoise -c 1-7 -T 1 -d 10m -q
Hardware-related Noise
duration: 0 00:10:00 | time is in us
CPU Period Runtime Noise % CPU Aval Max Noise Max Single HW NMI
1 #599 599000000 0 100.00000 0 0 0 0
2 #599 599000000 0 100.00000 0 0 0 0
3 #599 599000000 0 100.00000 0 0 0 0
4 #599 599000000 0 100.00000 0 0 0 0
5 #599 599000000 0 100.00000 0 0 0 0
6 #599 599000000 0 100.00000 0 0 0 0
7 #599 599000000 0 100.00000 0 0 0 0
SEE ALSO
========
**rtla-osnoise**\(1)
Osnoise tracer documentation: <https://www.kernel.org/doc/html/latest/trace/osnoise-tracer.html>
AUTHOR
======
Written by Daniel Bristot de Oliveira <[email protected]>
.. include:: common_appendix.txt
요약·해설
rtla-hwnoise.rst:1-109interrupt와 scheduling을 끈 osnoise 측정으로 NMI와 hardware-related noise를 분리하고 CPU별 가용률과 최대 noise를 해석하는 방법을 설명합니다.