← Documents Documentation/ABI/testing/sysfs-platform-mellanox-pmc GitHub 원문 ↗

Linux 6.18.37 · ABI / testing

Mellanox BlueField PMC performance-counter sysfs ABI

BlueField 세대별 PMC HID와 block event selection, counters, enable, register reset 및 cycle-count reservation을 설명합니다.

Source pathDocumentation/ABI/testing/sysfs-platform-mellanox-pmc
Source versionLinux v6.18.37
TranslationDUJINLABS 전문 번역 + 해설

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

1. 요약·해설

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

BlueField generation mapping

sysfs-platform-mellanox-pmc:1-14

MLNXBFD0·1·2 HID를 BlueField-1·2·3 performance-counter device에 대응시킵니다.

Event programming과 counter lifecycle

sysfs-platform-mellanox-pmc:15-54

Event ID를 선택하고 counter를 읽거나 0으로 clear하며 block 전체를 동시에 start·stop합니다.

Cycle-count counter reservation

sysfs-platform-mellanox-pmc:55-64

Counter별 bitmask로 cycle counting을 예약하면 같은 counter의 programmed event보다 우선합니다.

2. 영어 원문 전체

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

원문 전체 펼치기
1 HID Driver Description
2 MLNXBFD0 mlxbf-pmc Performance counters (BlueField-1)
3 MLNXBFD1 mlxbf-pmc Performance counters (BlueField-2)
4 MLNXBFD2 mlxbf-pmc Performance counters (BlueField-3)
5
6 What: /sys/bus/platform/devices/<HID>/hwmon/hwmonX/<block>/event_list
7 Date: Dec 2020
8 KernelVersion: 5.10
9 Contact: "Shravan Kumar Ramani <[email protected]>"
10 Description:
11 List of events supported by the counters in the specific block.
12 It is used to extract the event number or ID associated with
13 each event.
14
15 What: /sys/bus/platform/devices/<HID>/hwmon/hwmonX/<block>/event<N>
16 Date: Dec 2020
17 KernelVersion: 5.10
18 Contact: "Shravan Kumar Ramani <[email protected]>"
19 Description:
20 Event monitored by corresponding counter. This is used to
21 program or read back the event that should be or is currently
22 being monitored by counter<N>.
23
24 What: /sys/bus/platform/devices/<HID>/hwmon/hwmonX/<block>/counter<N>
25 Date: Dec 2020
26 KernelVersion: 5.10
27 Contact: "Shravan Kumar Ramani <[email protected]>"
28 Description:
29 Counter value of the event being monitored. This is used to
30 read the counter value of the event which was programmed using
31 event<N>. This is also used to clear or reset the counter value
32 by writing 0 to the counter sysfs.
33
34 What: /sys/bus/platform/devices/<HID>/hwmon/hwmonX/<block>/enable
35 Date: Dec 2020
36 KernelVersion: 5.10
37 Contact: "Shravan Kumar Ramani <[email protected]>"
38 Description:
39 Start or stop counters. This is used to start the counters
40 for monitoring the programmed events and also to stop the
41 counters after the desired duration. Writing value 1 will
42 start all the counters in the block, and writing 0 will
43 stop all the counters together.
44
45 What: /sys/bus/platform/devices/<HID>/hwmon/hwmonX/<block>/<reg>
46 Date: Dec 2020
47 KernelVersion: 5.10
48 Contact: "Shravan Kumar Ramani <[email protected]>"
49 Description:
50 Value of register. This is used to read or reset the registers
51 where various performance statistics are counted for each block.
52 Writing 0 to the sysfs will clear the counter, writing any other
53 value is not allowed.
54
55 What: /sys/bus/platform/devices/<HID>/hwmon/hwmonX/<block>/count_clock
56 Date: Mar 2025
57 KernelVersion: 6.14
58 Contact: "Shravan Kumar Ramani <[email protected]>"
59 Description:
60 Use a counter for counting cycles. This is used to repurpose/dedicate
61 any of the counters in the block to counting cycles. Each counter is
62 represented by a bit (bit 0 for counter0, bit1 for counter1 and so on)
63 and setting the corresponding bit will reserve that specific counter
64 for counting cycles and override the event<N> setting.
65

3. 한국어 전문 번역

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

Mellanox BlueField PMC performance-counter sysfs ABI: event list

1-14
항목한국어 전문 번역
What/sys/bus/platform/devices/<HID>/hwmon/hwmonX/<block>/event_list
Date2020년 12월
KernelVersion5.10
Contact"Shravan Kumar Ramani <[email protected]>"
DescriptionHID와 driver mapping은 `MLNXBFD0 -> mlxbf-pmc -> Performance counters (BlueField-1)`, `MLNXBFD1 -> mlxbf-pmc -> Performance counters (BlueField-2)`, `MLNXBFD2 -> mlxbf-pmc -> Performance counters (BlueField-3)`입니다. `/sys/bus/platform/devices/<HID>/hwmon/hwmonX/<block>/event_list`는 해당 block counters가 지원하는 events list를 제공합니다. 각 event와 연결된 event number 또는 ID를 찾는 데 사용합니다.
BlueField PMC HID mapping
HIDDriverDescription
MLNXBFD0mlxbf-pmcPerformance counters (BlueField-1)
MLNXBFD1mlxbf-pmcPerformance counters (BlueField-2)
MLNXBFD2mlxbf-pmcPerformance counters (BlueField-3)

원문 머리말의 HID, driver와 generation mapping입니다.

Mellanox BlueField PMC performance-counter sysfs ABI: event<N>

15-23
항목한국어 전문 번역
What/sys/bus/platform/devices/<HID>/hwmon/hwmonX/<block>/event<N>
Date2020년 12월
KernelVersion5.10
Contact"Shravan Kumar Ramani <[email protected]>"
Description`/sys/bus/platform/devices/<HID>/hwmon/hwmonX/<block>/event<N>`은 대응하는 counter가 monitor할 event입니다. `counter<N>`이 monitor해야 하거나 현재 monitor 중인 event를 program하거나 read back합니다.
PMC event-counter programming
Read event_listChoose event IDProgram event<N>Start block countersRead counter<N>

Event inventory에서 ID를 골라 같은 N의 event와 counter files로 monitor합니다.

Mellanox BlueField PMC performance-counter sysfs ABI: counter<N>

24-33
항목한국어 전문 번역
What/sys/bus/platform/devices/<HID>/hwmon/hwmonX/<block>/counter<N>
Date2020년 12월
KernelVersion5.10
Contact"Shravan Kumar Ramani <[email protected]>"
Description`/sys/bus/platform/devices/<HID>/hwmon/hwmonX/<block>/counter<N>`은 monitor 중인 event의 counter value입니다. `event<N>`으로 program한 event counter를 읽습니다. 이 sysfs file에 `0`을 쓰면 counter value를 clear 또는 reset합니다.

Mellanox BlueField PMC performance-counter sysfs ABI: enable

34-44
항목한국어 전문 번역
What/sys/bus/platform/devices/<HID>/hwmon/hwmonX/<block>/enable
Date2020년 12월
KernelVersion5.10
Contact"Shravan Kumar Ramani <[email protected]>"
Description`/sys/bus/platform/devices/<HID>/hwmon/hwmonX/<block>/enable`은 counters를 start 또는 stop합니다. Program된 events를 원하는 duration 동안 monitor하도록 block의 모든 counters를 `1`로 함께 시작하고 `0`으로 함께 멈춥니다.
Block counter enable
ValueAction
1Start all counters in block
0Stop all counters in block

Enable write는 block의 모든 counters에 함께 적용됩니다.

Mellanox BlueField PMC performance-counter sysfs ABI: <reg>

45-54
항목한국어 전문 번역
What/sys/bus/platform/devices/<HID>/hwmon/hwmonX/<block>/<reg>
Date2020년 12월
KernelVersion5.10
Contact"Shravan Kumar Ramani <[email protected]>"
Description`/sys/bus/platform/devices/<HID>/hwmon/hwmonX/<block>/<reg>`는 register value입니다. 각 block의 performance statistics가 count되는 registers를 read하거나 reset합니다. `0`을 쓰면 counter를 clear하며 다른 value는 허용되지 않습니다.

Mellanox BlueField PMC performance-counter sysfs ABI: count clock

55-64
항목한국어 전문 번역
What/sys/bus/platform/devices/<HID>/hwmon/hwmonX/<block>/count_clock
Date2025년 3월
KernelVersion6.14
Contact"Shravan Kumar Ramani <[email protected]>"
Description`/sys/bus/platform/devices/<HID>/hwmon/hwmonX/<block>/count_clock`은 counter를 cycle counting 용도로 사용합니다. Block의 counter마다 bit 하나를 대응시키며 bit 0은 counter0, bit 1은 counter1 같은 방식입니다. Bit를 set하면 해당 counter를 cycle counting에 reserve하여 `event<N>` setting을 override합니다.
count_clock bit mapping
BitCounterEffect
0counter0Reserve for cycle counting
1counter1Reserve for cycle counting
NcounterNOverride event<N> setting

각 bit가 같은 index의 counter를 event monitoring 대신 cycle counting에 예약합니다.