요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
2. 영어 원문 전체
번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
.. SPDX-License-Identifier: GPL-2.0-only
================================================
Fujitsu Uncore Performance Monitoring Unit (PMU)
================================================
This driver supports the Uncore MAC PMUs and the Uncore PCI PMUs found
in Fujitsu chips.
Each MAC PMU on these chips is exposed as a uncore perf PMU with device name
mac_iod<iod>_mac<mac>_ch<ch>.
And each PCI PMU on these chips is exposed as a uncore perf PMU with device name
pci_iod<iod>_pci<pci>.
The driver provides a description of its available events and configuration
options in sysfs, see /sys/bus/event_sources/devices/mac_iod<iod>_mac<mac>_ch<ch>/
and /sys/bus/event_sources/devices/pci_iod<iod>_pci<pci>/.
This driver exports:
- formats, used by perf user space and other tools to configure events
- events, used by perf user space and other tools to create events
symbolically, e.g.::
perf stat -a -e mac_iod0_mac0_ch0/event=0x21/ ls
perf stat -a -e pci_iod0_pci0/event=0x24/ ls
- cpumask, used by perf user space and other tools to know on which CPUs
to open the events
This driver supports the following events for MAC:
- cycles
This event counts MAC cycles at MAC frequency.
- read-count
This event counts the number of read requests to MAC.
- read-count-request
This event counts the number of read requests including retry to MAC.
- read-count-return
This event counts the number of responses to read requests to MAC.
- read-count-request-pftgt
This event counts the number of read requests including retry with PFTGT
flag.
- read-count-request-normal
This event counts the number of read requests including retry without PFTGT
flag.
- read-count-return-pftgt-hit
This event counts the number of responses to read requests which hit the
PFTGT buffer.
- read-count-return-pftgt-miss
This event counts the number of responses to read requests which miss the
PFTGT buffer.
- read-wait
This event counts outstanding read requests issued by DDR memory controller
per cycle.
- write-count
This event counts the number of write requests to MAC (including zero write,
full write, partial write, write cancel).
- write-count-write
This event counts the number of full write requests to MAC (not including
zero write).
- write-count-pwrite
This event counts the number of partial write requests to MAC.
- memory-read-count
This event counts the number of read requests from MAC to memory.
- memory-write-count
This event counts the number of full write requests from MAC to memory.
- memory-pwrite-count
This event counts the number of partial write requests from MAC to memory.
- ea-mac
This event counts energy consumption of MAC.
- ea-memory
This event counts energy consumption of memory.
- ea-memory-mac-write
This event counts the number of write requests from MAC to memory.
- ea-ha
This event counts energy consumption of HA.
'ea' is the abbreviation for 'Energy Analyzer'.
Examples for use with perf::
perf stat -e mac_iod0_mac0_ch0/ea-mac/ ls
And, this driver supports the following events for PCI:
- pci-port0-cycles
This event counts PCI cycles at PCI frequency in port0.
- pci-port0-read-count
This event counts read transactions for data transfer in port0.
- pci-port0-read-count-bus
This event counts read transactions for bus usage in port0.
- pci-port0-write-count
This event counts write transactions for data transfer in port0.
- pci-port0-write-count-bus
This event counts write transactions for bus usage in port0.
- pci-port1-cycles
This event counts PCI cycles at PCI frequency in port1.
- pci-port1-read-count
This event counts read transactions for data transfer in port1.
- pci-port1-read-count-bus
This event counts read transactions for bus usage in port1.
- pci-port1-write-count
This event counts write transactions for data transfer in port1.
- pci-port1-write-count-bus
This event counts write transactions for bus usage in port1.
- ea-pci
This event counts energy consumption of PCI.
'ea' is the abbreviation for 'Energy Analyzer'.
Examples for use with perf::
perf stat -e pci_iod0_pci0/ea-pci/ ls
Given that these are uncore PMUs the driver does not support sampling, therefore
"perf record" will not work. Per-task perf sessions are not supported.
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.
MAC·PCI PMU와 sysfs
1-28이 문서는 `SPDX-License-Identifier: GPL-2.0-only`입니다. `Fujitsu Uncore Performance Monitoring Unit (PMU)` driver는 Fujitsu chip의 `Uncore MAC PMUs`와 `Uncore PCI PMUs`를 지원합니다.
| PMU | Device name | Sysfs |
|---|---|---|
| Uncore MAC PMU | `mac_iod<iod>_mac<mac>_ch<ch>` | `/sys/bus/event_sources/devices/mac_iod<iod>_mac<mac>_ch<ch>/` |
| Uncore PCI PMU | `pci_iod<iod>_pci<pci>` | `/sys/bus/event_sources/devices/pci_iod<iod>_pci<pci>/` |
Driver는 sysfs에 event와 configuration option을 설명하며 `formats`는 event 구성, `events`는 symbolic event 생성, `cpumask`는 event를 열 CPU 선택에 사용합니다.
Raw event code를 지정하는 예시는 다음과 같습니다.
perf stat -a -e mac_iod0_mac0_ch0/event=0x21/ ls
perf stat -a -e pci_iod0_pci0/event=0x24/ ls
지원 MAC event
29-78MAC PMU는 cycle, read/write request와 retry·PFTGT 상태, outstanding read, memory traffic와 energy consumption을 count합니다.
| Event | Count 대상 |
|---|---|
| `cycles` | MAC frequency 기준 MAC cycle |
| `read-count` | MAC으로 보낸 read request 수 |
| `read-count-request` | Retry를 포함한 MAC read request 수 |
| `read-count-return` | Read request response 수 |
| `read-count-request-pftgt` | PFTGT flag가 있는 retry 포함 read request 수 |
| `read-count-request-normal` | PFTGT flag가 없는 retry 포함 read request 수 |
| `read-count-return-pftgt-hit` | PFTGT buffer에 hit한 read response 수 |
| `read-count-return-pftgt-miss` | PFTGT buffer에 miss한 read response 수 |
| `read-wait` | Cycle마다 DDR memory controller가 발행한 outstanding read request |
| `write-count` | Zero/full/partial write와 write cancel을 포함한 MAC write request 수 |
| `write-count-write` | Zero write를 제외한 MAC full-write request 수 |
| `write-count-pwrite` | MAC partial-write request 수 |
| `memory-read-count` | MAC에서 memory로 보낸 read request 수 |
| `memory-write-count` | MAC에서 memory로 보낸 full-write request 수 |
| `memory-pwrite-count` | MAC에서 memory로 보낸 partial-write request 수 |
| `ea-mac` | MAC energy consumption |
| `ea-memory` | Memory energy consumption |
| `ea-memory-mac-write` | MAC에서 memory로 보낸 write request 수 |
| `ea-ha` | HA energy consumption |
`ea`는 `Energy Analyzer`의 abbreviation입니다.
MAC energy 예시
79-82MAC의 energy consumption을 측정하는 예시입니다.
perf stat -e mac_iod0_mac0_ch0/ea-mac/ ls
지원 PCI event
83-109PCI PMU는 port0과 port1의 PCI-frequency cycle, data-transfer와 bus-usage read/write transaction, PCI energy consumption을 count합니다.
| Event | Count 대상 |
|---|---|
| `pci-port0-cycles` | Port0의 PCI-frequency cycle |
| `pci-port0-read-count` | Port0 data-transfer read transaction |
| `pci-port0-read-count-bus` | Port0 bus-usage read transaction |
| `pci-port0-write-count` | Port0 data-transfer write transaction |
| `pci-port0-write-count-bus` | Port0 bus-usage write transaction |
| `pci-port1-cycles` | Port1의 PCI-frequency cycle |
| `pci-port1-read-count` | Port1 data-transfer read transaction |
| `pci-port1-read-count-bus` | Port1 bus-usage read transaction |
| `pci-port1-write-count` | Port1 data-transfer write transaction |
| `pci-port1-write-count-bus` | Port1 bus-usage write transaction |
| `ea-pci` | PCI energy consumption |
PCI event에서도 `ea`는 `Energy Analyzer`를 뜻합니다.
PCI energy와 제한
110-115PCI energy consumption을 측정하는 예시입니다.
perf stat -e pci_iod0_pci0/ea-pci/ ls
Uncore PMU이므로 driver는 sampling을 지원하지 않아 `perf record`가 동작하지 않으며 Per-task perf session도 지원하지 않습니다.
운영 핵심
fujitsu_uncore_pmu.rst:1-115MAC channel 또는 PCI instance를 device name으로 선택하고 symbolic event나 raw event code로 traffic과 Energy Analyzer 값을 측정합니다.