1 =========================================================
2 NVIDIA Tegra SoC Uncore Performance Monitoring Unit (PMU)
3 =========================================================
5 The NVIDIA Tegra SoC includes various system PMUs to measure key performance
6 metrics like memory bandwidth, latency, and utilization:
8 * Scalable Coherency Fabric (SCF)
17 The PMUs in this document are based on ARM CoreSight PMU Architecture as
18 described in document: ARM IHI 0091. Since this is a standard architecture, the
19 PMUs are managed by a common driver "arm-cs-arch-pmu". This driver describes
20 the available events and configuration of each PMU in sysfs. Please see the
21 sections below to get the sysfs path of each PMU. Like other uncore PMU drivers,
22 the driver provides "cpumask" sysfs attribute to show the CPU id used to handle
23 the PMU event. There is also "associated_cpus" sysfs attribute, which contains a
24 list of CPUs associated with the PMU instance.
31 The SCF PMU monitors system level cache events, CPU traffic, and
32 strongly-ordered (SO) PCIE write traffic to local/remote memory. Please see
33 :ref:`NVIDIA_Uncore_PMU_Traffic_Coverage_Section` for more info about the PMU
36 The events and configuration options of this PMU device are described in sysfs,
37 see /sys/bus/event_source/devices/nvidia_scf_pmu_<socket-id>.
41 * Count event id 0x0 in socket 0::
43 perf stat -a -e nvidia_scf_pmu_0/event=0x0/
45 * Count event id 0x0 in socket 1::
47 perf stat -a -e nvidia_scf_pmu_1/event=0x0/
52 The NVLink-C2C0 PMU monitors incoming traffic from a GPU/CPU connected with
53 NVLink-C2C (Chip-2-Chip) interconnect. The type of traffic captured by this PMU
54 varies dependent on the chip configuration:
56 * NVIDIA Grace Hopper Superchip: Hopper GPU is connected with Grace SoC.
58 In this config, the PMU captures GPU ATS translated or EGM traffic from the GPU.
60 * NVIDIA Grace CPU Superchip: two Grace CPU SoCs are connected.
62 In this config, the PMU captures read and relaxed ordered (RO) writes from
63 PCIE device of the remote SoC.
65 Please see :ref:`NVIDIA_Uncore_PMU_Traffic_Coverage_Section` for more info about
66 the PMU traffic coverage.
68 The events and configuration options of this PMU device are described in sysfs,
69 see /sys/bus/event_source/devices/nvidia_nvlink_c2c0_pmu_<socket-id>.
73 * Count event id 0x0 from the GPU/CPU connected with socket 0::
75 perf stat -a -e nvidia_nvlink_c2c0_pmu_0/event=0x0/
77 * Count event id 0x0 from the GPU/CPU connected with socket 1::
79 perf stat -a -e nvidia_nvlink_c2c0_pmu_1/event=0x0/
81 * Count event id 0x0 from the GPU/CPU connected with socket 2::
83 perf stat -a -e nvidia_nvlink_c2c0_pmu_2/event=0x0/
85 * Count event id 0x0 from the GPU/CPU connected with socket 3::
87 perf stat -a -e nvidia_nvlink_c2c0_pmu_3/event=0x0/
89 The NVLink-C2C has two ports that can be connected to one GPU (occupying both
90 ports) or to two GPUs (one GPU per port). The user can use "port" bitmap
91 parameter to select the port(s) to monitor. Each bit represents the port number,
92 e.g. "port=0x1" corresponds to port 0 and "port=0x3" is for port 0 and 1. The
93 PMU will monitor both ports by default if not specified.
95 Example for port filtering:
97 * Count event id 0x0 from the GPU connected with socket 0 on port 0::
99 perf stat -a -e nvidia_nvlink_c2c0_pmu_0/event=0x0,port=0x1/
101 * Count event id 0x0 from the GPUs connected with socket 0 on port 0 and port 1::
103 perf stat -a -e nvidia_nvlink_c2c0_pmu_0/event=0x0,port=0x3/
108 The NVLink-C2C1 PMU monitors incoming traffic from a GPU connected with
109 NVLink-C2C (Chip-2-Chip) interconnect. This PMU captures untranslated GPU
110 traffic, in contrast with NvLink-C2C0 PMU that captures ATS translated traffic.
111 Please see :ref:`NVIDIA_Uncore_PMU_Traffic_Coverage_Section` for more info about
112 the PMU traffic coverage.
114 The events and configuration options of this PMU device are described in sysfs,
115 see /sys/bus/event_source/devices/nvidia_nvlink_c2c1_pmu_<socket-id>.
119 * Count event id 0x0 from the GPU connected with socket 0::
121 perf stat -a -e nvidia_nvlink_c2c1_pmu_0/event=0x0/
123 * Count event id 0x0 from the GPU connected with socket 1::
125 perf stat -a -e nvidia_nvlink_c2c1_pmu_1/event=0x0/
127 * Count event id 0x0 from the GPU connected with socket 2::
129 perf stat -a -e nvidia_nvlink_c2c1_pmu_2/event=0x0/
131 * Count event id 0x0 from the GPU connected with socket 3::
133 perf stat -a -e nvidia_nvlink_c2c1_pmu_3/event=0x0/
135 The NVLink-C2C has two ports that can be connected to one GPU (occupying both
136 ports) or to two GPUs (one GPU per port). The user can use "port" bitmap
137 parameter to select the port(s) to monitor. Each bit represents the port number,
138 e.g. "port=0x1" corresponds to port 0 and "port=0x3" is for port 0 and 1. The
139 PMU will monitor both ports by default if not specified.
141 Example for port filtering:
143 * Count event id 0x0 from the GPU connected with socket 0 on port 0::
145 perf stat -a -e nvidia_nvlink_c2c1_pmu_0/event=0x0,port=0x1/
147 * Count event id 0x0 from the GPUs connected with socket 0 on port 0 and port 1::
149 perf stat -a -e nvidia_nvlink_c2c1_pmu_0/event=0x0,port=0x3/
154 The CNVLink PMU monitors traffic from GPU and PCIE device on remote sockets
155 to local memory. For PCIE traffic, this PMU captures read and relaxed ordered
156 (RO) write traffic. Please see :ref:`NVIDIA_Uncore_PMU_Traffic_Coverage_Section`
157 for more info about the PMU traffic coverage.
159 The events and configuration options of this PMU device are described in sysfs,
160 see /sys/bus/event_source/devices/nvidia_cnvlink_pmu_<socket-id>.
162 Each SoC socket can be connected to one or more sockets via CNVLink. The user can
163 use "rem_socket" bitmap parameter to select the remote socket(s) to monitor.
164 Each bit represents the socket number, e.g. "rem_socket=0xE" corresponds to
165 socket 1 to 3. The PMU will monitor all remote sockets by default if not
167 /sys/bus/event_source/devices/nvidia_cnvlink_pmu_<socket-id>/format/rem_socket
168 shows the valid bits that can be set in the "rem_socket" parameter.
170 The PMU can not distinguish the remote traffic initiator, therefore it does not
171 provide filter to select the traffic source to monitor. It reports combined
172 traffic from remote GPU and PCIE devices.
176 * Count event id 0x0 for the traffic from remote socket 1, 2, and 3 to socket 0::
178 perf stat -a -e nvidia_cnvlink_pmu_0/event=0x0,rem_socket=0xE/
180 * Count event id 0x0 for the traffic from remote socket 0, 2, and 3 to socket 1::
182 perf stat -a -e nvidia_cnvlink_pmu_1/event=0x0,rem_socket=0xD/
184 * Count event id 0x0 for the traffic from remote socket 0, 1, and 3 to socket 2::
186 perf stat -a -e nvidia_cnvlink_pmu_2/event=0x0,rem_socket=0xB/
188 * Count event id 0x0 for the traffic from remote socket 0, 1, and 2 to socket 3::
190 perf stat -a -e nvidia_cnvlink_pmu_3/event=0x0,rem_socket=0x7/
196 The PCIE PMU monitors all read/write traffic from PCIE root ports to
197 local/remote memory. Please see :ref:`NVIDIA_Uncore_PMU_Traffic_Coverage_Section`
198 for more info about the PMU traffic coverage.
200 The events and configuration options of this PMU device are described in sysfs,
201 see /sys/bus/event_source/devices/nvidia_pcie_pmu_<socket-id>.
203 Each SoC socket can support multiple root ports. The user can use
204 "root_port" bitmap parameter to select the port(s) to monitor, i.e.
205 "root_port=0xF" corresponds to root port 0 to 3. The PMU will monitor all root
206 ports by default if not specified.
207 /sys/bus/event_source/devices/nvidia_pcie_pmu_<socket-id>/format/root_port
208 shows the valid bits that can be set in the "root_port" parameter.
212 * Count event id 0x0 from root port 0 and 1 of socket 0::
214 perf stat -a -e nvidia_pcie_pmu_0/event=0x0,root_port=0x3/
216 * Count event id 0x0 from root port 0 and 1 of socket 1::
218 perf stat -a -e nvidia_pcie_pmu_1/event=0x0,root_port=0x3/
220 .. _NVIDIA_Uncore_PMU_Traffic_Coverage_Section:
225 The PMU traffic coverage may vary dependent on the chip configuration:
227 * **NVIDIA Grace Hopper Superchip**: Hopper GPU is connected with Grace SoC.
229 Example configuration with two Grace SoCs::
231 ********************************* *********************************
232 * SOCKET-A * * SOCKET-B *
234 * :::::::: * * :::::::: *
235 * : PCIE : * * : PCIE : *
236 * :::::::: * * :::::::: *
239 * ::::::: ::::::::: * * ::::::::: ::::::: *
240 * : : : : * * : : : : *
241 * : GPU :<--NVLink-->: Grace :<---CNVLink--->: Grace :<--NVLink-->: GPU : *
242 * : : C2C : SoC : * * : SoC : C2C : : *
243 * ::::::: ::::::::: * * ::::::::: ::::::: *
246 * &&&&&&&& &&&&&&&& * * &&&&&&&& &&&&&&&& *
247 * & GMEM & & CMEM & * * & CMEM & & GMEM & *
248 * &&&&&&&& &&&&&&&& * * &&&&&&&& &&&&&&&& *
250 ********************************* *********************************
252 GMEM = GPU Memory (e.g. HBM)
253 CMEM = CPU Memory (e.g. LPDDR5X)
256 | Following table contains traffic coverage of Grace SoC PMU in socket-A:
260 +--------------+-------+-----------+-----------+-----+----------+----------+
262 + +-------+-----------+-----------+-----+----------+----------+
263 | Destination | |GPU ATS |GPU Not-ATS| | Socket-B | Socket-B |
264 | |PCI R/W|Translated,|Translated | CPU | CPU/PCIE1| GPU/PCIE2|
266 +==============+=======+===========+===========+=====+==========+==========+
267 | Local | PCIE |NVLink-C2C0|NVLink-C2C1| SCF | SCF PMU | CNVLink |
268 | SYSRAM/CMEM | PMU |PMU |PMU | PMU | | PMU |
269 +--------------+-------+-----------+-----------+-----+----------+----------+
270 | Local GMEM | PCIE | N/A |NVLink-C2C1| SCF | SCF PMU | CNVLink |
271 | | PMU | |PMU | PMU | | PMU |
272 +--------------+-------+-----------+-----------+-----+----------+----------+
273 | Remote | PCIE |NVLink-C2C0|NVLink-C2C1| SCF | | |
274 | SYSRAM/CMEM | PMU |PMU |PMU | PMU | N/A | N/A |
275 | over CNVLink | | | | | | |
276 +--------------+-------+-----------+-----------+-----+----------+----------+
277 | Remote GMEM | PCIE |NVLink-C2C0|NVLink-C2C1| SCF | | |
278 | over CNVLink | PMU |PMU |PMU | PMU | N/A | N/A |
279 +--------------+-------+-----------+-----------+-----+----------+----------+
281 PCIE1 traffic represents strongly ordered (SO) writes.
282 PCIE2 traffic represents reads and relaxed ordered (RO) writes.
284 * **NVIDIA Grace CPU Superchip**: two Grace CPU SoCs are connected.
286 Example configuration with two Grace SoCs::
288 ******************* *******************
289 * SOCKET-A * * SOCKET-B *
291 * :::::::: * * :::::::: *
292 * : PCIE : * * : PCIE : *
293 * :::::::: * * :::::::: *
296 * ::::::::: * * ::::::::: *
298 * : Grace :<--------NVLink------->: Grace : *
299 * : SoC : * C2C * : SoC : *
300 * ::::::::: * * ::::::::: *
303 * &&&&&&&& * * &&&&&&&& *
304 * & CMEM & * * & CMEM & *
305 * &&&&&&&& * * &&&&&&&& *
307 ******************* *******************
309 GMEM = GPU Memory (e.g. HBM)
310 CMEM = CPU Memory (e.g. LPDDR5X)
313 | Following table contains traffic coverage of Grace SoC PMU in socket-A:
317 +-----------------+-----------+---------+----------+-------------+
319 + +-----------+---------+----------+-------------+
320 | Destination | | | Socket-B | Socket-B |
321 | | PCI R/W | CPU | CPU/PCIE1| PCIE2 |
323 +=================+===========+=========+==========+=============+
324 | Local | PCIE PMU | SCF PMU | SCF PMU | NVLink-C2C0 |
325 | SYSRAM/CMEM | | | | PMU |
326 +-----------------+-----------+---------+----------+-------------+
328 | SYSRAM/CMEM | PCIE PMU | SCF PMU | N/A | N/A |
329 | over NVLink-C2C | | | | |
330 +-----------------+-----------+---------+----------+-------------+
332 PCIE1 traffic represents strongly ordered (SO) writes.
333 PCIE2 traffic represents reads and relaxed ordered (RO) writes.