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

Linux 6.18.37 · Administration / Performance

Arm Coherent Mesh Network PMU

CMN-600의 DTM·DTC 분산 counter, node targeting과 flit watchpoint 조합을 설명합니다.

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

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

1. 요약·해설

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

운영 핵심

arm-cmn.rst:1-65

기본 aggregate count에서 특정 node 또는 combined watchpoint로 좁힐 때 TRM의 node ID와 match-group 정의를 함께 적용합니다.

관점핵심
FabricCMN-600 rectangular XP mesh와 AMBA CHI agent
LocalXP별 DTM이 최대 4 event signal count
GlobalDTC가 최대 8 global counter와 overflow interrupt 제공
PMU`arm_cmn_0`, multi-mesh는 `arm_cmn_{1..n}`
Target기본 aggregate; `bynodeid=1` + `nodeid`로 특정 node
WatchpointUpload/download event, value/mask와 combine pairing

2. 영어 원문 전체

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

원문 전체 펼치기
1 =============================
2 Arm Coherent Mesh Network PMU
3 =============================
4
5 CMN-600 is a configurable mesh interconnect consisting of a rectangular
6 grid of crosspoints (XPs), with each crosspoint supporting up to two
7 device ports to which various AMBA CHI agents are attached.
8
9 CMN implements a distributed PMU design as part of its debug and trace
10 functionality. This consists of a local monitor (DTM) at every XP, which
11 counts up to 4 event signals from the connected device nodes and/or the
12 XP itself. Overflow from these local counters is accumulated in up to 8
13 global counters implemented by the main controller (DTC), which provides
14 overall PMU control and interrupts for global counter overflow.
15
16 PMU events
17 ----------
18
19 The PMU driver registers a single PMU device for the whole interconnect,
20 see /sys/bus/event_source/devices/arm_cmn_0. Multi-chip systems may link
21 more than one CMN together via external CCIX links - in this situation,
22 each mesh counts its own events entirely independently, and additional
23 PMU devices will be named arm_cmn_{1..n}.
24
25 Most events are specified in a format based directly on the TRM
26 definitions - "type" selects the respective node type, and "eventid" the
27 event number. Some events require an additional occupancy ID, which is
28 specified by "occupid".
29
30 * Since RN-D nodes do not have any distinct events from RN-I nodes, they
31 are treated as the same type (0xa), and the common event templates are
32 named "rnid_*".
33
34 * The cycle counter is treated as a synthetic event belonging to the DTC
35 node ("type" == 0x3, "eventid" is ignored).
36
37 * XP events also encode the port and channel in the "eventid" field, to
38 match the underlying pmu_event0_id encoding for the pmu_event_sel
39 register. The event templates are named with prefixes to cover all
40 permutations.
41
42 By default each event provides an aggregate count over all nodes of the
43 given type. To target a specific node, "bynodeid" must be set to 1 and
44 "nodeid" to the appropriate value derived from the CMN configuration
45 (as defined in the "Node ID Mapping" section of the TRM).
46
47 Watchpoints
48 -----------
49
50 The PMU can also count watchpoint events to monitor specific flit
51 traffic. Watchpoints are treated as a synthetic event type, and like PMU
52 events can be global or targeted with a particular XP's "nodeid" value.
53 Since the watchpoint direction is otherwise implicit in the underlying
54 register selection, separate events are provided for flit uploads and
55 downloads.
56
57 The flit match value and mask are passed in config1 and config2 ("val"
58 and "mask" respectively). "wp_dev_sel", "wp_chn_sel", "wp_grp" and
59 "wp_exclusive" are specified per the TRM definitions for dtm_wp_config0.
60 Where a watchpoint needs to match fields from both match groups on the
61 REQ or SNP channel, it can be specified as two events - one for each
62 group - with the same nonzero "combine" value. The count for such a
63 pair of combined events will be attributed to the primary match.
64 Watchpoint events with a "combine" value of 0 are considered independent
65 and will count individually.
66

3. 한국어 전문 번역

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

CMN-600 분산 PMU

1-15

`Arm Coherent Mesh Network PMU`의 CMN-600은 rectangular grid의 crosspoint(`XP`)로 구성된 configurable mesh interconnect이며 XP마다 최대 두 device port에 여러 AMBA CHI agent가 연결됩니다.

Debug·trace 기능의 distributed PMU는 각 XP의 local monitor(`DTM`)와 main controller의 global counter(`DTC`)로 구성됩니다.

DTM은 연결된 device node나 XP 자체에서 최대 `4 event signals`를 count합니다. Local counter overflow는 DTC의 최대 `8 global counters`에 누적되고 DTC가 전체 PMU control과 global-counter overflow interrupt를 제공합니다.

Node event와 target 지정

16-46

Driver는 interconnect 전체에 PMU device 하나를 `/sys/bus/event_source/devices/arm_cmn_0`으로 등록합니다. External CCIX link로 여러 CMN을 연결한 multi-chip system에서는 mesh마다 event를 독립적으로 count하고 추가 PMU는 `arm_cmn_{1..n}`으로 이름 붙습니다.

대부분 event format은 TRM 정의를 직접 따르며 `type`이 node type을, `eventid`가 event number를 선택합니다. 일부 event는 `occupid` occupancy ID도 요구합니다.

대상Parameter동작
Node event`type`TRM node type 선택
Node event`eventid`Event number 선택
Occupancy event`occupid`추가 occupancy ID
Specific node`bynodeid=1`, `nodeid=<value>`TRM Node ID Mapping에서 얻은 node만 target

RN-D node는 RN-I와 구별되는 event가 없어 같은 type `0xa`로 취급하고 공통 template 이름은 `rnid_*`입니다.

Cycle counter는 DTC node의 synthetic event로 취급합니다. `type == 0x3`이고 `eventid`는 무시됩니다.

XP event는 underlying `pmu_event0_id`의 `pmu_event_sel` register encoding과 맞도록 port와 channel도 `eventid` field에 encode하며 template prefix가 모든 permutation을 포괄합니다.

기본적으로 event는 해당 type의 모든 node를 aggregate합니다. 특정 node만 target하려면 `bynodeid=1`과 CMN configuration의 TRM `Node ID Mapping`에서 얻은 `nodeid`를 지정합니다.

Flit watchpoint

47-65

`Watchpoints`는 특정 flit traffic을 monitoring하는 synthetic event type이며 global 또는 특정 XP의 `nodeid` target으로 사용할 수 있습니다.

Underlying register 선택에 direction이 암묵적으로 포함되므로 flit uploads와 downloads에는 별도 event가 제공됩니다.

항목설정
Match value`config1` / `val`
Match mask`config2` / `mask`
Selection`wp_dev_sel`, `wp_chn_sel`, `wp_grp`, `wp_exclusive`
REQ/SNP 두 match group같은 nonzero `combine` 값의 event 두 개
독립 watchpoint`combine=0`; 각각 별도로 count

Flit match value와 mask는 각각 `config1`의 `val`, `config2`의 `mask`로 전달합니다. `wp_dev_sel`, `wp_chn_sel`, `wp_grp`, `wp_exclusive`는 TRM의 `dtm_wp_config0` 정의를 따릅니다.

REQ 또는 SNP channel의 두 match group을 함께 맞추려면 같은 nonzero `combine` 값을 가진 event 두 개를 사용하며 count는 primary match에 귀속됩니다. `combine=0`은 독립 event로 각각 count합니다.