Linux 6.7 Perf Adds Support For Zen 4 Unified Memory Controller Events

Written by Michael Larabel in AMD on 6 November 2023 at 02:21 PM EST. Add A Comment
AMD
Going back to early last year saw AMD Linux engineers posting PerfMonV2 patches in preparation for Zen 4 processors. The PerfMonV2 updated performance monitoring capabilities with Zen 4 were merged last year and are supported with the latest EPYC 8004/9004 series processors. Coming only now though to Linux 6.7 is support for Unified Memory Controller (UMC) events as part of PerfMonV2.

Left out of the original PerfMonV2 enablement patches last year for integrating into Linux's "perf" subsystem were these Unified Memory Controller events capabilities.... Presumably since the initial PerfMonV2 patches came out prior to the Zen 4 processors launching and these patches do acknowledge 12 channels of DDR5 memory support, which AMD might have not wanted to officially slip at the time prior to the EPYC Genoa(X)/Bergamo product announcements.

AMD EPYC Zen 4 processor


In any event last week with the perf events changes submitted for the Linux 6.7 kernel, it adds support for the AMD UMC events with Zen 4. That is the main set of perf events changes this kernel cycle while there are also some updates for Intel Meteor Lake, micro-optimizations to the Run-Time Average Power Limiting (RAPL) code, and other fixes.

The patches for the AMD perf driver with memory controller support explain of the new UMC events:
"Unified Memory Controller (UMC) events were introduced with Zen 4 as a part of the Performance Monitoring Version 2 (PerfMonV2) enhancements. An event is specified using the EventSelect bits and the RdWrMask bits can be used for additional filtering of read and write requests.

As of now, a maximum of 12 channels of DDR5 are available on each socket and each channel is controlled by a dedicated UMC. Each UMC, in turn, has its own set of performance monitoring counters.

Since the MSR address space for the UMC PERF_CTL and PERF_CTR registers are reused across sockets, uncore groups are created on the basis of socket IDs. Hence, group exclusivity is mandatory while opening events so that events for an UMC can only be opened on CPUs which are on the same socket as the corresponding memory channel."

The UMC events go alongside data fabric and L3 cache perf events already supported by the AMD uncore code. The UMC perf events with Zen 4 processors is merged for Linux 6.7 that will debut as stable around the end of the calendar year.
Related News
About The Author
Michael Larabel

Michael Larabel is the principal author of Phoronix.com and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via MichaelLarabel.com.

Popular News This Week