요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
Event programming과 counter lifecycle
sysfs-platform-mellanox-pmc:15-54Event ID를 선택하고 counter를 읽거나 0으로 clear하며 block 전체를 동시에 start·stop합니다.
Cycle-count counter reservation
sysfs-platform-mellanox-pmc:55-64Counter별 bitmask로 cycle counting을 예약하면 같은 counter의 programmed event보다 우선합니다.
2. 영어 원문 전체
번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
HID Driver Description
MLNXBFD0 mlxbf-pmc Performance counters (BlueField-1)
MLNXBFD1 mlxbf-pmc Performance counters (BlueField-2)
MLNXBFD2 mlxbf-pmc Performance counters (BlueField-3)
What: /sys/bus/platform/devices/<HID>/hwmon/hwmonX/<block>/event_list
Date: Dec 2020
KernelVersion: 5.10
Contact: "Shravan Kumar Ramani <[email protected]>"
Description:
List of events supported by the counters in the specific block.
It is used to extract the event number or ID associated with
each event.
What: /sys/bus/platform/devices/<HID>/hwmon/hwmonX/<block>/event<N>
Date: Dec 2020
KernelVersion: 5.10
Contact: "Shravan Kumar Ramani <[email protected]>"
Description:
Event monitored by corresponding counter. This is used to
program or read back the event that should be or is currently
being monitored by counter<N>.
What: /sys/bus/platform/devices/<HID>/hwmon/hwmonX/<block>/counter<N>
Date: Dec 2020
KernelVersion: 5.10
Contact: "Shravan Kumar Ramani <[email protected]>"
Description:
Counter value of the event being monitored. This is used to
read the counter value of the event which was programmed using
event<N>. This is also used to clear or reset the counter value
by writing 0 to the counter sysfs.
What: /sys/bus/platform/devices/<HID>/hwmon/hwmonX/<block>/enable
Date: Dec 2020
KernelVersion: 5.10
Contact: "Shravan Kumar Ramani <[email protected]>"
Description:
Start or stop counters. This is used to start the counters
for monitoring the programmed events and also to stop the
counters after the desired duration. Writing value 1 will
start all the counters in the block, and writing 0 will
stop all the counters together.
What: /sys/bus/platform/devices/<HID>/hwmon/hwmonX/<block>/<reg>
Date: Dec 2020
KernelVersion: 5.10
Contact: "Shravan Kumar Ramani <[email protected]>"
Description:
Value of register. This is used to read or reset the registers
where various performance statistics are counted for each block.
Writing 0 to the sysfs will clear the counter, writing any other
value is not allowed.
What: /sys/bus/platform/devices/<HID>/hwmon/hwmonX/<block>/count_clock
Date: Mar 2025
KernelVersion: 6.14
Contact: "Shravan Kumar Ramani <[email protected]>"
Description:
Use a counter for counting cycles. This is used to repurpose/dedicate
any of the counters in the block to counting cycles. Each counter is
represented by a bit (bit 0 for counter0, bit1 for counter1 and so on)
and setting the corresponding bit will reserve that specific counter
for counting cycles and override the event<N> setting.
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 |
| Date | 2020년 12월 |
| KernelVersion | 5.10 |
| Contact | "Shravan Kumar Ramani <[email protected]>" |
| Description | HID와 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를 찾는 데 사용합니다. |
원문 머리말의 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> |
| Date | 2020년 12월 |
| KernelVersion | 5.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합니다. |
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> |
| Date | 2020년 12월 |
| KernelVersion | 5.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 |
| Date | 2020년 12월 |
| KernelVersion | 5.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`으로 함께 멈춥니다. |
Enable write는 block의 모든 counters에 함께 적용됩니다.
Mellanox BlueField PMC performance-counter sysfs ABI: <reg>
45-54| 항목 | 한국어 전문 번역 |
|---|---|
| What | /sys/bus/platform/devices/<HID>/hwmon/hwmonX/<block>/<reg> |
| Date | 2020년 12월 |
| KernelVersion | 5.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 |
| Date | 2025년 3월 |
| KernelVersion | 6.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합니다. |
각 bit가 같은 index의 counter를 event monitoring 대신 cycle counting에 예약합니다.
BlueField generation mapping
sysfs-platform-mellanox-pmc:1-14MLNXBFD0·1·2 HID를 BlueField-1·2·3 performance-counter device에 대응시킵니다.