← Documents Documentation/admin-guide/perf/thunderx2-pmu.rst GitHub 원문 ↗

Linux 6.18.37 · Administration / Performance

Cavium ThunderX2 Uncore PMU

ThunderX2 L3C, DMC, CCPI2 counter 구조와 socket별 측정 방식을 설명합니다.

Source pathDocumentation/admin-guide/perf/thunderx2-pmu.rst
Source versionLinux v6.18.37
TranslationDUJINLABS 전문 번역 + 해설

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

1. 요약·해설

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

운영 요약

thunderx2-pmu.rst:1-44

Socket별 L3C/DMC/CCPI2 PMU에서 channel 0 값을 전체 interleave 수로 비례 환산하며, counter 폭과 개수 차이를 고려해 event를 배치합니다.

관점핵심
범위Socket별 독립 system-wide uncore PMU
PMUL3C, DDR4 DMC, CCPI2
InterleaveDMC 8 channels, L3C 16 tiles
Count 방식Channel 0을 세고 전체 channel/tile 수로 비례 환산
Counter 수DMC/L3C 최대 4개, CCPI2 최대 8개
OverflowInterrupt 미지원
제한Sampling, `perf record`, per-task session 미지원

2. 영어 원문 전체

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

원문 전체 펼치기
1 =============================================================
2 Cavium ThunderX2 SoC Performance Monitoring Unit (PMU UNCORE)
3 =============================================================
4
5 The ThunderX2 SoC PMU consists of independent, system-wide, per-socket
6 PMUs such as the Level 3 Cache (L3C), DDR4 Memory Controller (DMC) and
7 Cavium Coherent Processor Interconnect (CCPI2).
8
9 The DMC has 8 interleaved channels and the L3C has 16 interleaved tiles.
10 Events are counted for the default channel (i.e. channel 0) and prorated
11 to the total number of channels/tiles.
12
13 The DMC and L3C support up to 4 counters, while the CCPI2 supports up to 8
14 counters. Counters are independently programmable to different events and
15 can be started and stopped individually. None of the counters support an
16 overflow interrupt. DMC and L3C counters are 32-bit and read every 2 seconds.
17 The CCPI2 counters are 64-bit and assumed not to overflow in normal operation.
18
19 PMU UNCORE (perf) driver:
20
21 The thunderx2_pmu driver registers per-socket perf PMUs for the DMC and
22 L3C devices. Each PMU can be used to count up to 4 (DMC/L3C) or up to 8
23 (CCPI2) events simultaneously. The PMUs provide a description of their
24 available events and configuration options under sysfs, see
25 /sys/bus/event_source/devices/uncore_<l3c_S/dmc_S/ccpi2_S/>; S is the socket id.
26
27 The driver does not support sampling, therefore "perf record" will not
28 work. Per-task perf sessions are also not supported.
29
30 Examples::
31
32 # perf stat -a -e uncore_dmc_0/cnt_cycles/ sleep 1
33
34 # perf stat -a -e \
35 uncore_dmc_0/cnt_cycles/,\
36 uncore_dmc_0/data_transfers/,\
37 uncore_dmc_0/read_txns/,\
38 uncore_dmc_0/write_txns/ sleep 1
39
40 # perf stat -a -e \
41 uncore_l3c_0/read_request/,\
42 uncore_l3c_0/read_hit/,\
43 uncore_l3c_0/inv_request/,\
44 uncore_l3c_0/inv_hit/ sleep 1
45

3. 한국어 전문 번역

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

Socket별 L3C, DMC와 CCPI2

1-17

ThunderX2 SoC PMU는 Level 3 Cache(L3C), DDR4 Memory Controller(DMC), Cavium Coherent Processor Interconnect(CCPI2) 같은 독립적인 socket별 system-wide PMU로 구성됩니다.

DMC에는 interleaved channel 8개, L3C에는 interleaved tile 16개가 있습니다. Event는 기본 channel인 channel 0에서 세고 전체 channel 또는 tile 수에 맞춰 비례 환산합니다.

DMC와 L3C는 최대 4 counters, CCPI2는 최대 8 counters를 지원합니다. 각 counter의 event programming과 start/stop은 독립적입니다. 어느 counter도 overflow interrupt를 지원하지 않습니다.

DMC와 L3C counter는 32-bit이며 2초마다 읽습니다. CCPI2 counter는 64-bit이고 정상 운용에서는 overflow하지 않는다고 가정합니다.

PMUCounter 특성
DMC32-bit, 2초마다 읽음, 최대 4 counters
L3C32-bit, 2초마다 읽음, 최대 4 counters
CCPI264-bit, 정상 운용에서는 overflow하지 않는다고 가정, 최대 8 counters
제어Counter별 event programming과 start/stop이 독립적

Perf driver와 sysfs

18-29

`thunderx2_pmu` driver는 DMC와 L3C 장치를 위한 socket별 perf PMU를 등록합니다. DMC/L3C는 최대 4개, CCPI2는 최대 8개 event를 동시에 셀 수 있습니다.

사용 가능한 event와 설정 option은 `/sys/bus/event_source/devices/uncore_<l3c_S/dmc_S/ccpi2_S/>` 아래에 있으며 `S`는 socket ID입니다.

항목경로 또는 의미
Driver`thunderx2_pmu`
L3C`/sys/bus/event_source/devices/uncore_l3c_S/`
DMC`/sys/bus/event_source/devices/uncore_dmc_S/`
CCPI2`/sys/bus/event_source/devices/uncore_ccpi2_S/`; `S`는 socket ID

Driver는 sampling을 지원하지 않으므로 `perf record`가 동작하지 않으며, per-task perf session도 지원하지 않습니다.

DMC와 L3C 측정 예제

30-44

첫 명령은 socket 0 DMC의 cycle을 system-wide로 1초 동안 측정합니다.

# perf stat -a -e uncore_dmc_0/cnt_cycles/ sleep 1

다음 명령은 DMC counter 4개를 사용해 cycle, data transfer, read transaction, write transaction을 함께 측정합니다.

# perf stat -a -e \
uncore_dmc_0/cnt_cycles/,\
uncore_dmc_0/data_transfers/,\
uncore_dmc_0/read_txns/,\
uncore_dmc_0/write_txns/ sleep 1

마지막 명령은 L3C의 read request/hit와 invalidation request/hit를 함께 측정합니다.

# perf stat -a -e \
uncore_l3c_0/read_request/,\
uncore_l3c_0/read_hit/,\
uncore_l3c_0/inv_request/,\
uncore_l3c_0/inv_hit/ sleep 1