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

Linux 6.18.37 · Administration / Performance

Qualcomm Centriq L2 Cache PMU

Centriq L2 cluster PMU 집계, 8개 event group 제약과 CPU affinity를 설명합니다.

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

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

1. 요약·해설

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

운영 요약

qcom_l2_pmu.rst:1-39

Event의 마지막 16진수 자리로 group을 확인하고 같은 group의 event가 한 측정에 겹치지 않게 구성한 뒤 logical L2 PMU에서 cluster 결과를 집계합니다.

관점핵심
대상Qualcomm Technologies Centriq SoC의 L2 cache cluster
물리 구조Cluster마다 자체 PMU와 연관 CPU가 있음
논리 장치물리 PMU 결과를 합치는 단일 `L2 PMU`
Event 제약8개 group에서 group당 한 event만 동시 사용
Event 형식`0xCCG`: code `CC`, group `G`(0-7)
Cycle event2차원 배열 밖의 `0xFE`
제한Sampling, `perf record`, per-task session 미지원

2. 영어 원문 전체

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

원문 전체 펼치기
1 =====================================================================
2 Qualcomm Technologies Level-2 Cache Performance Monitoring Unit (PMU)
3 =====================================================================
4
5 This driver supports the L2 cache clusters found in Qualcomm Technologies
6 Centriq SoCs. There are multiple physical L2 cache clusters, each with their
7 own PMU. Each cluster has one or more CPUs associated with it.
8
9 There is one logical L2 PMU exposed, which aggregates the results from
10 the physical PMUs.
11
12 The driver provides a description of its available events and configuration
13 options in sysfs, see /sys/bus/event_source/devices/l2cache_0.
14
15 The "format" directory describes the format of the events.
16
17 Events can be envisioned as a 2-dimensional array. Each column represents
18 a group of events. There are 8 groups. Only one entry from each
19 group can be in use at a time. If multiple events from the same group
20 are specified, the conflicting events cannot be counted at the same time.
21
22 Events are specified as 0xCCG, where CC is 2 hex digits specifying
23 the code (array row) and G specifies the group (column) 0-7.
24
25 In addition there is a cycle counter event specified by the value 0xFE
26 which is outside the above scheme.
27
28 The driver provides a "cpumask" sysfs attribute which contains a mask
29 consisting of one CPU per cluster which will be used to handle all the PMU
30 events on that cluster.
31
32 Examples for use with perf::
33
34 perf stat -e l2cache_0/config=0x001/,l2cache_0/config=0x042/ -a sleep 1
35
36 perf stat -e l2cache_0/config=0xfe/ -C 2 sleep 1
37
38 The driver does not support sampling, therefore "perf record" will
39 not work. Per-task perf sessions are not supported.
40

3. 한국어 전문 번역

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

L2 cluster와 논리 PMU

1-10

이 driver는 Qualcomm Technologies Centriq SoC에 있는 L2 cache cluster를 지원합니다. 물리 L2 cache cluster는 여러 개이며, 각 cluster에는 자체 PMU가 있고 하나 이상의 CPU가 연결됩니다.

외부에는 논리적인 `L2 PMU` 하나만 노출됩니다. 이 장치는 여러 physical PMU가 낸 결과를 집계합니다.

Sysfs와 2차원 event 공간

11-26

사용 가능한 event와 설정 option은 `/sys/bus/event_source/devices/l2cache_0` 아래 sysfs에서 확인합니다. `format` directory는 event 형식을 설명합니다.

Event는 2차원 배열로 생각할 수 있습니다. 열은 event group이며 총 8개입니다. 한 group에서는 한 항목만 사용할 수 있으므로 같은 group의 event를 여러 개 지정하면 충돌한 event를 동시에 셀 수 없습니다.

Event 값은 `0xCCG` 형식입니다. `CC`는 배열 행에 해당하는 2자리 16진수 code이고 `G`는 배열 열에 해당하는 0-7 group 번호입니다. Cycle counter event `0xFE`는 이 체계 밖에 있습니다.

필드의미
`CC`2자리 16진수 event code, 즉 배열의 행
`G`0-7 group 번호, 즉 배열의 열
동시 사용서로 다른 group은 함께 측정 가능
충돌같은 group의 여러 event는 동시에 측정 불가

CPU affinity, 예제와 제한

27-39

`cpumask` sysfs attribute에는 cluster마다 CPU 하나가 포함됩니다. 그 CPU가 해당 cluster의 모든 PMU event를 처리합니다.

perf stat -e l2cache_0/config=0x001/,l2cache_0/config=0x042/ -a sleep 1

첫 예제는 서로 다른 group의 event `0x001`과 `0x042`를 system-wide로 1초 동안 측정합니다. 다음 예제는 CPU 2에서 cycle event `0xfe`를 측정합니다.

perf stat -e l2cache_0/config=0xfe/ -C 2 sleep 1

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

항목경로 또는 의미
장치`/sys/bus/event_source/devices/l2cache_0`
`format`Event 설정 형식
`cpumask`Cluster마다 event를 처리할 CPU 하나
집계Logical PMU가 physical PMU 결과를 합산