Commit ea0421c
Report native CMN mesh (uncore) performance metrics (facebookresearch#605)
Summary:
**Problem**
The Neoverse V3 perf report exposed a single CMN memory metric ("CMN Memory
Read Bandwidth") derived from `hns_mc_reqs_local_all`. That name was misleading
(the event counts read+write) and, more importantly, the metric was incomplete:
it ignored remote (cross-mesh) memory traffic and surfaced none of the other
CMN mesh telemetry the hardware exposes. An earlier attempt to add DRAM
read/write bandwidth via the external Arm cmn-tools repo (port-filtered
crosspoint watchpoints, cloned at install time) produced unusable numbers on
this platform -- write bandwidth reported as 0 and implausibly high mesh
bandwidth -- and added network / `/dev/mem` / kernel-module fragility to the
install path.
**Why**
Root cause of the cmn-tools garbage: on a typical deployment, system
PMU-monitoring daemons hold many CMN perf_event handles continuously, starving
the CMN DTC's small hardware counter budget. cmn-tools' watchpoint programming
collides with the arm-cmn driver under that contention. Named perf events do
not -- perf multiplexes and scales them, so steady-state values stay accurate.
Separately, the HN-S MC-request event has no read/write split (confirmed against
the Arm CMN event set), so a DRAM byte-level read/write split is not observable
from HN-S counters at all.
**Fix**
Drop the cmn-tools apparatus entirely (the platform-tools install hook, mesh
discovery and topdown-runner scripts, and the log-parsing path in the report
generator). Instead report native CMN PMU metrics that correspond to the HN-S
"effectiveness" event group in the Arm CMN Technical Reference Manual:
- **CMN Memory Bandwidth (MBps)** -- read+write total, now summing local **and**
remote MC requests across all mesh instances (each 64B request counted once at
its home HN-S, so no double-counting).
- **CMN Local / Remote Memory Bandwidth (MBps)** -- memory locality split.
- **CMN Memory Read Mix %** -- read share via HN-S QoS PoCQ occupancy (the only
read/write proxy the HN-S exposes).
- **CMN MC Retry %** -- memory-controller backpressure (mc_retry).
- **CMN Snoop Filter Hit Rate %** -- coherence-directory effectiveness (sf_hit_ratio).
- **CMN Mesh Frequency (GHz)** -- from dtc_cycles, for DVFS-throttling visibility.
The collect script keeps the CMN event group intentionally lean because of the
counter contention described above.
Differential Revision: D1022443541 parent b4d5f7f commit ea0421c
2 files changed
Lines changed: 195 additions & 18 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
128 | 128 | | |
129 | 129 | | |
130 | 130 | | |
131 | | - | |
132 | | - | |
133 | | - | |
134 | | - | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
135 | 150 | | |
136 | 151 | | |
137 | 152 | | |
138 | 153 | | |
139 | 154 | | |
| 155 | + | |
140 | 156 | | |
| 157 | + | |
| 158 | + | |
141 | 159 | | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
142 | 163 | | |
143 | 164 | | |
144 | 165 | | |
| |||
152 | 173 | | |
153 | 174 | | |
154 | 175 | | |
155 | | - | |
| 176 | + | |
156 | 177 | | |
157 | 178 | | |
158 | 179 | | |
| |||
179 | 200 | | |
180 | 201 | | |
181 | 202 | | |
| 203 | + | |
182 | 204 | | |
183 | 205 | | |
184 | 206 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
7 | 6 | | |
8 | 7 | | |
9 | 8 | | |
| |||
165 | 164 | | |
166 | 165 | | |
167 | 166 | | |
168 | | - | |
| 167 | + | |
169 | 168 | | |
170 | | - | |
171 | | - | |
172 | | - | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
173 | 172 | | |
174 | 173 | | |
175 | 174 | | |
| |||
788 | 787 | | |
789 | 788 | | |
790 | 789 | | |
791 | | - | |
| 790 | + | |
| 791 | + | |
| 792 | + | |
| 793 | + | |
| 794 | + | |
| 795 | + | |
| 796 | + | |
| 797 | + | |
| 798 | + | |
| 799 | + | |
| 800 | + | |
| 801 | + | |
| 802 | + | |
| 803 | + | |
| 804 | + | |
| 805 | + | |
| 806 | + | |
792 | 807 | | |
793 | 808 | | |
794 | 809 | | |
795 | 810 | | |
796 | | - | |
797 | | - | |
| 811 | + | |
| 812 | + | |
798 | 813 | | |
799 | | - | |
800 | | - | |
| 814 | + | |
| 815 | + | |
| 816 | + | |
| 817 | + | |
| 818 | + | |
| 819 | + | |
801 | 820 | | |
802 | 821 | | |
| 822 | + | |
| 823 | + | |
| 824 | + | |
| 825 | + | |
| 826 | + | |
| 827 | + | |
| 828 | + | |
| 829 | + | |
| 830 | + | |
| 831 | + | |
| 832 | + | |
| 833 | + | |
| 834 | + | |
| 835 | + | |
| 836 | + | |
| 837 | + | |
| 838 | + | |
| 839 | + | |
| 840 | + | |
803 | 841 | | |
804 | 842 | | |
805 | 843 | | |
806 | 844 | | |
807 | | - | |
| 845 | + | |
808 | 846 | | |
809 | 847 | | |
810 | 848 | | |
811 | 849 | | |
812 | 850 | | |
| 851 | + | |
| 852 | + | |
| 853 | + | |
| 854 | + | |
| 855 | + | |
| 856 | + | |
| 857 | + | |
| 858 | + | |
| 859 | + | |
| 860 | + | |
| 861 | + | |
| 862 | + | |
| 863 | + | |
| 864 | + | |
| 865 | + | |
| 866 | + | |
| 867 | + | |
| 868 | + | |
| 869 | + | |
| 870 | + | |
| 871 | + | |
| 872 | + | |
| 873 | + | |
| 874 | + | |
| 875 | + | |
| 876 | + | |
| 877 | + | |
| 878 | + | |
| 879 | + | |
| 880 | + | |
| 881 | + | |
| 882 | + | |
| 883 | + | |
| 884 | + | |
| 885 | + | |
| 886 | + | |
| 887 | + | |
| 888 | + | |
| 889 | + | |
| 890 | + | |
| 891 | + | |
| 892 | + | |
| 893 | + | |
| 894 | + | |
| 895 | + | |
| 896 | + | |
| 897 | + | |
| 898 | + | |
| 899 | + | |
| 900 | + | |
| 901 | + | |
| 902 | + | |
| 903 | + | |
| 904 | + | |
| 905 | + | |
| 906 | + | |
| 907 | + | |
| 908 | + | |
| 909 | + | |
| 910 | + | |
| 911 | + | |
| 912 | + | |
| 913 | + | |
| 914 | + | |
| 915 | + | |
| 916 | + | |
| 917 | + | |
| 918 | + | |
| 919 | + | |
| 920 | + | |
| 921 | + | |
| 922 | + | |
| 923 | + | |
| 924 | + | |
| 925 | + | |
| 926 | + | |
| 927 | + | |
| 928 | + | |
| 929 | + | |
| 930 | + | |
| 931 | + | |
| 932 | + | |
| 933 | + | |
| 934 | + | |
| 935 | + | |
| 936 | + | |
| 937 | + | |
| 938 | + | |
| 939 | + | |
| 940 | + | |
| 941 | + | |
| 942 | + | |
| 943 | + | |
| 944 | + | |
| 945 | + | |
| 946 | + | |
| 947 | + | |
| 948 | + | |
| 949 | + | |
| 950 | + | |
| 951 | + | |
| 952 | + | |
| 953 | + | |
| 954 | + | |
| 955 | + | |
| 956 | + | |
| 957 | + | |
| 958 | + | |
| 959 | + | |
| 960 | + | |
| 961 | + | |
813 | 962 | | |
814 | 963 | | |
815 | 964 | | |
| |||
946 | 1095 | | |
947 | 1096 | | |
948 | 1097 | | |
949 | | - | |
950 | | - | |
| 1098 | + | |
| 1099 | + | |
| 1100 | + | |
| 1101 | + | |
| 1102 | + | |
| 1103 | + | |
| 1104 | + | |
| 1105 | + | |
951 | 1106 | | |
952 | 1107 | | |
953 | 1108 | | |
| |||
0 commit comments