← Documents Documentation/tools/rtla/common_timerlat_description.txt GitHub 원문 ↗

Linux 6.18.37 · Kernel Tools

rtla timerlat 동작 설명

timerlat의 IRQ·Thread latency 측정과 BPF kernel-space 수집에서 tracefs user-space fallback으로 전환하는 방식을 설명합니다.

Source pathDocumentation/tools/rtla/common_timerlat_description.txt
Source versionLinux v6.18.37
TranslationDUJINLABS 전문 번역 + 해설

요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.

1. 요약·해설

원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.

요약·해설

common_timerlat_description.txt:1-18

timerlat의 IRQ·Thread latency 측정과 BPF kernel-space 수집에서 tracefs user-space fallback으로 전환하는 방식을 설명합니다.

2. 영어 원문 전체

번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.

원문 전체 펼치기
1 The **rtla timerlat** tool is an interface for the *timerlat* tracer. The
2 *timerlat* tracer dispatches a kernel thread per-cpu. These threads
3 set a periodic timer to wake themselves up and go back to sleep. After
4 the wakeup, they collect and generate useful information for the
5 debugging of operating system timer latency.
6
7 The *timerlat* tracer outputs information in two ways. It periodically
8 prints the timer latency at the timer *IRQ* handler and the *Thread*
9 handler. It also enables the trace of the most relevant information via
10 **osnoise:** tracepoints.
11
12 The **rtla timerlat** tool sets the options of the *timerlat* tracer
13 and collects and displays a summary of the results. By default,
14 the collection is done synchronously in kernel space using a dedicated
15 BPF program attached to the *timerlat* tracer. If either BPF or
16 the **osnoise:timerlat_sample** tracepoint it attaches to is
17 unavailable, the **rtla timerlat** tool falls back to using tracefs to
18 process the data asynchronously in user space.
19

3. 한국어 전문 번역

영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.

IRQ와 Thread latency 측정

1-10

`rtla timerlat`는 `timerlat` tracer의 interface다. tracer는 CPU마다 kernel thread를 배치하고 각 thread가 자신을 깨울 periodic timer를 설정한 뒤 다시 sleep한다. wakeup 뒤에는 operating-system timer latency debug에 필요한 정보를 수집하고 생성한다.

tracer는 timer IRQ handler와 Thread handler의 latency를 주기적으로 출력하고, `osnoise:` tracepoint를 통해 가장 관련성 높은 정보의 trace도 활성화한다.

timerlat sample
Periodic timerTimer IRQ handler latency
IRQ handlerWake timerlat threadThread handler latency
osnoise tracepointsDebug trace

timer expiry에서 kernel thread wakeup까지 두 latency를 관찰한다.

The **rtla timerlat** tool is an interface for the *timerlat* tracer. The
*timerlat* tracer dispatches a kernel thread per-cpu. These threads
set a periodic timer to wake themselves up and go back to sleep. After
the wakeup, they collect and generate useful information for the
debugging of operating system timer latency.

The *timerlat* tracer outputs information in two ways. It periodically
prints the timer latency at the timer *IRQ* handler and the *Thread*
handler. It also enables the trace of the most relevant information via
**osnoise:** tracepoints.

BPF 동기 수집과 tracefs fallback

11-18

`rtla timerlat`는 tracer option을 설정하고 결과 summary를 수집해 표시한다. 기본 수집은 `timerlat` tracer에 attach된 전용 BPF program으로 kernel space에서 동기적으로 수행한다.

BPF 또는 program이 attach하는 `osnoise:timerlat_sample` tracepoint를 사용할 수 없으면 `rtla timerlat`는 tracefs를 이용해 user space에서 data를 비동기 처리하는 방식으로 fallback한다.

timerlat 수집 mode
Mode위치조건
BPFkernel space, synchronous기본; BPF와 timerlat_sample 사용 가능
tracefsuser space, asynchronousBPF 또는 tracepoint 사용 불가

기본 경로와 fallback 조건을 구분한다.


The **rtla timerlat** tool sets the options of the *timerlat* tracer
and collects and displays a summary of the results. By default,
the collection is done synchronously in kernel space using a dedicated
BPF program attached to the *timerlat* tracer. If either BPF or
the **osnoise:timerlat_sample** tracepoint it attaches to is
unavailable, the **rtla timerlat** tool falls back to using tracefs to
process the data asynchronously in user space.