Osphinx.addnodesdocument)}( rawsourcechildren]( translations LanguagesNode)}(hhh](h pending_xref)}(hhh]docutils.nodesTextChinese (Simplified)}parenthsba attributes}(ids]classes]names]dupnames]backrefs] refdomainstdreftypedoc reftarget-/translations/zh_CN/admin-guide/perf/hisi-pmumodnameN classnameN refexplicitutagnamehhh ubh)}(hhh]hChinese (Traditional)}hh2sbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget-/translations/zh_TW/admin-guide/perf/hisi-pmumodnameN classnameN refexplicituh1hhh ubh)}(hhh]hItalian}hhFsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget-/translations/it_IT/admin-guide/perf/hisi-pmumodnameN classnameN refexplicituh1hhh ubh)}(hhh]hJapanese}hhZsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget-/translations/ja_JP/admin-guide/perf/hisi-pmumodnameN classnameN refexplicituh1hhh ubh)}(hhh]hKorean}hhnsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget-/translations/ko_KR/admin-guide/perf/hisi-pmumodnameN classnameN refexplicituh1hhh ubh)}(hhh]hSpanish}hhsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget-/translations/sp_SP/admin-guide/perf/hisi-pmumodnameN classnameN refexplicituh1hhh ubeh}(h]h ]h"]h$]h&]current_languageEnglishuh1h hh _documenthsourceNlineNubhsection)}(hhh](htitle)}(h6HiSilicon SoC uncore Performance Monitoring Unit (PMU)h]h6HiSilicon SoC uncore Performance Monitoring Unit (PMU)}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhG/var/lib/git/docbuild/linux/Documentation/admin-guide/perf/hisi-pmu.rsthKubh paragraph)}(hThe HiSilicon SoC chip includes various independent system device PMUs such as L3 cache (L3C), Hydra Home Agent (HHA) and DDRC. These PMUs are independent and have hardware logic to gather statistics and performance information.h]hThe HiSilicon SoC chip includes various independent system device PMUs such as L3 cache (L3C), Hydra Home Agent (HHA) and DDRC. These PMUs are independent and have hardware logic to gather statistics and performance information.}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh)}(hXThe HiSilicon SoC encapsulates multiple CPU and IO dies. Each CPU cluster (CCL) is made up of 4 cpu cores sharing one L3 cache; each CPU die is called Super CPU cluster (SCCL) and is made up of 6 CCLs. Each SCCL has two HHAs (0 - 1) and four DDRCs (0 - 3), respectively.h]hXThe HiSilicon SoC encapsulates multiple CPU and IO dies. Each CPU cluster (CCL) is made up of 4 cpu cores sharing one L3 cache; each CPU die is called Super CPU cluster (SCCL) and is made up of 6 CCLs. Each SCCL has two HHAs (0 - 1) and four DDRCs (0 - 3), respectively.}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK hhhhubh)}(hhh](h)}(hHiSilicon SoC uncore PMU driverh]hHiSilicon SoC uncore PMU driver}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhhhKubh)}(hEach device PMU has separate registers for event counting, control and interrupt, and the PMU driver shall register perf PMU drivers like L3C, HHA and DDRC etc. The available events and configuration options shall be described in the sysfs, see:h]hEach device PMU has separate registers for event counting, control and interrupt, and the PMU driver shall register perf PMU drivers like L3C, HHA and DDRC etc. The available events and configuration options shall be described in the sysfs, see:}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh)}(h/sys/bus/event_source/devices/hisi_sccl{X}_. The "perf list" command shall list the available events from sysfs.h]h/sys/bus/event_source/devices/hisi_sccl{X}_. The “perf list” command shall list the available events from sysfs.}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh)}(hEach L3C, HHA and DDRC is registered as a separate PMU with perf. The PMU name will appear in event listing as hisi_sccl_module. where "sccl-id" is the identifier of the SCCL and "index-id" is the index of module.h]hEach L3C, HHA and DDRC is registered as a separate PMU with perf. The PMU name will appear in event listing as hisi_sccl_module. where “sccl-id” is the identifier of the SCCL and “index-id” is the index of module.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh)}(hXe.g. hisi_sccl3_l3c0/rd_hit_cpipe is READ_HIT_CPIPE event of L3C index #0 in SCCL ID #3.h]hXe.g. hisi_sccl3_l3c0/rd_hit_cpipe is READ_HIT_CPIPE event of L3C index #0 in SCCL ID #3.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh)}(hXe.g. hisi_sccl1_hha0/rx_operations is RX_OPERATIONS event of HHA index #0 in SCCL ID #1.h]hXe.g. hisi_sccl1_hha0/rx_operations is RX_OPERATIONS event of HHA index #0 in SCCL ID #1.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK"hhhhubh)}(hX}The driver also provides a "cpumask" sysfs attribute, which shows the CPU core ID used to count the uncore PMU event. An "associated_cpus" sysfs attribute is also provided to show the CPUs associated with this PMU. The "cpumask" indicates the CPUs to open the events, usually as a hint for userspaces tools like perf. It only contains one associated CPU from the "associated_cpus".h]hXThe driver also provides a “cpumask” sysfs attribute, which shows the CPU core ID used to count the uncore PMU event. An “associated_cpus” sysfs attribute is also provided to show the CPUs associated with this PMU. The “cpumask” indicates the CPUs to open the events, usually as a hint for userspaces tools like perf. It only contains one associated CPU from the “associated_cpus”.}(hj,hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK%hhhhubh)}(hExample usage of perf::h]hExample usage of perf:}(hj:hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK+hhhhubh literal_block)}(hX$# perf list hisi_sccl3_l3c0/rd_hit_cpipe/ [kernel PMU event] ------------------------------------------ hisi_sccl3_l3c0/wr_hit_cpipe/ [kernel PMU event] ------------------------------------------ hisi_sccl1_l3c0/rd_hit_cpipe/ [kernel PMU event] ------------------------------------------ hisi_sccl1_l3c0/wr_hit_cpipe/ [kernel PMU event] ------------------------------------------ $# perf stat -a -e hisi_sccl3_l3c0/rd_hit_cpipe/ sleep 5 $# perf stat -a -e hisi_sccl3_l3c0/config=0x02/ sleep 5h]hX$# perf list hisi_sccl3_l3c0/rd_hit_cpipe/ [kernel PMU event] ------------------------------------------ hisi_sccl3_l3c0/wr_hit_cpipe/ [kernel PMU event] ------------------------------------------ hisi_sccl1_l3c0/rd_hit_cpipe/ [kernel PMU event] ------------------------------------------ hisi_sccl1_l3c0/wr_hit_cpipe/ [kernel PMU event] ------------------------------------------ $# perf stat -a -e hisi_sccl3_l3c0/rd_hit_cpipe/ sleep 5 $# perf stat -a -e hisi_sccl3_l3c0/config=0x02/ sleep 5}hjJsbah}(h]h ]h"]h$]h&] xml:spacepreserveuh1jHhhhK-hhhhubh)}(hFor HiSilicon uncore PMU v2 whose identifier is 0x30, the topology is the same as PMU v1, but some new functions are added to the hardware.h]hFor HiSilicon uncore PMU v2 whose identifier is 0x30, the topology is the same as PMU v1, but some new functions are added to the hardware.}(hjZhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK:hhhhubh)}(hd1. L3C PMU supports filtering by core/thread within the cluster which can be specified as a bitmap::h]hc1. L3C PMU supports filtering by core/thread within the cluster which can be specified as a bitmap:}(hjhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK=hhhhubjI)}(hC$# perf stat -a -e hisi_sccl3_l3c0/config=0x02,tt_core=0x3/ sleep 5h]hC$# perf stat -a -e hisi_sccl3_l3c0/config=0x02,tt_core=0x3/ sleep 5}hjvsbah}(h]h ]h"]h$]h&]jXjYuh1jHhhhK@hhhhubh)}(hMThis will only count the operations from core/thread 0 and 1 in this cluster.h]hMThis will only count the operations from core/thread 0 and 1 in this cluster.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKBhhhhubh)}(hXo2. Tracetag allow the user to chose to count only read, write or atomic operations via the tt_req parameeter in perf. The default value counts all operations. tt_req is 3bits, 3'b100 represents read operations, 3'b101 represents write operations, 3'b110 represents atomic store operations and 3'b111 represents atomic non-store operations, other values are reserved::h]hXv2. Tracetag allow the user to chose to count only read, write or atomic operations via the tt_req parameeter in perf. The default value counts all operations. tt_req is 3bits, 3’b100 represents read operations, 3’b101 represents write operations, 3’b110 represents atomic store operations and 3’b111 represents atomic non-store operations, other values are reserved:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKDhhhhubjI)}(hB$# perf stat -a -e hisi_sccl3_l3c0/config=0x02,tt_req=0x4/ sleep 5h]hB$# perf stat -a -e hisi_sccl3_l3c0/config=0x02,tt_req=0x4/ sleep 5}hjsbah}(h]h ]h"]h$]h&]jXjYuh1jHhhhKJhhhhubh)}(h9This will only count the read operations in this cluster.h]h9This will only count the read operations in this cluster.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKLhhhhubh)}(hq3. Datasrc allows the user to check where the data comes from. It is 5 bits. Some important codes are as follows:h]hq3. Datasrc allows the user to check where the data comes from. It is 5 bits. Some important codes are as follows:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKNhhhhubh bullet_list)}(hhh](h list_item)}(h%5'b00001: comes from L3C in this die;h]h)}(hjh]h'5’b00001: comes from L3C in this die;}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKQhjubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubj)}(h*5'b01000: comes from L3C in the cross-die;h]h)}(hjh]h,5’b01000: comes from L3C in the cross-die;}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKRhjubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubj)}(h45'b01001: comes from L3C which is in another socket;h]h)}(hjh]h65’b01001: comes from L3C which is in another socket;}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKShjubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubj)}(h#5'b01110: comes from the local DDR;h]h)}(hjh]h%5’b01110: comes from the local DDR;}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKThjubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubj)}(h'5'b01111: comes from the cross-die DDR;h]h)}(hj/h]h)5’b01111: comes from the cross-die DDR;}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKUhj-ubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubj)}(h'5'b10000: comes from cross-socket DDR; h]h)}(h&5'b10000: comes from cross-socket DDR;h]h(5’b10000: comes from cross-socket DDR;}(hjHhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKVhjDubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubeh}(h]h ]h"]h$]h&]bullet-uh1jhhhKQhhhhubh)}(hetc, it is mainly helpful to find that the data source is nearest from the CPU cores. If datasrc_cfg is used in the multi-chips, the datasrc_skt shall be configured in perf command::h]hetc, it is mainly helpful to find that the data source is nearest from the CPU cores. If datasrc_cfg is used in the multi-chips, the datasrc_skt shall be configured in perf command:}(hjdhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKXhhhhubjI)}(hu$# perf stat -a -e hisi_sccl3_l3c0/config=0xb9,datasrc_cfg=0xE/, hisi_sccl3_l3c0/config=0xb9,datasrc_cfg=0xF/ sleep 5h]hu$# perf stat -a -e hisi_sccl3_l3c0/config=0xb9,datasrc_cfg=0xE/, hisi_sccl3_l3c0/config=0xb9,datasrc_cfg=0xF/ sleep 5}hjrsbah}(h]h ]h"]h$]h&]jXjYuh1jHhhhK\hhhhubh)}(hX`4. Some HiSilicon SoCs encapsulate multiple CPU and IO dies. Each CPU die contains several Compute Clusters (CCLs). The I/O dies are called Super I/O clusters (SICL) containing multiple I/O clusters (ICLs). Each CCL/ICL in the SoC has a unique ID. Each ID is 11bits, include a 6-bit SCCL-ID and 5-bit CCL/ICL-ID. For I/O die, the ICL-ID is followed by:h]hX`4. Some HiSilicon SoCs encapsulate multiple CPU and IO dies. Each CPU die contains several Compute Clusters (CCLs). The I/O dies are called Super I/O clusters (SICL) containing multiple I/O clusters (ICLs). Each CCL/ICL in the SoC has a unique ID. Each ID is 11bits, include a 6-bit SCCL-ID and 5-bit CCL/ICL-ID. For I/O die, the ICL-ID is followed by:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK_hhhhubj)}(hhh](j)}(h5'b00000: I/O_MGMT_ICL;h]h)}(hjh]h5’b00000: I/O_MGMT_ICL;}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKehjubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubj)}(h5'b00001: Network_ICL;h]h)}(hjh]h5’b00001: Network_ICL;}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKfhjubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubj)}(h5'b00011: HAC_ICL;h]h)}(hjh]h5’b00011: HAC_ICL;}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKghjubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubj)}(h5'b10000: PCIe_ICL; h]h)}(h5'b10000: PCIe_ICL;h]h5’b10000: PCIe_ICL;}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhjubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubeh}(h]h ]h"]h$]h&]jbjcuh1jhhhKehhhhubh)}(h5. uring_channel: UC PMU events 0x47~0x59 supports filtering by tx request uring channel. It is 2 bits. Some important codes are as follows:h]h5. uring_channel: UC PMU events 0x47~0x59 supports filtering by tx request uring channel. It is 2 bits. Some important codes are as follows:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKjhhhhubj)}(hhh](j)}(hC2'b11: count the events which sent to the uring_ext (MATA) channel;h]h)}(hjh]hE2’b11: count the events which sent to the uring_ext (MATA) channel;}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKmhjubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubj)}(h2'b01: is the same as 2'b11;h]h)}(hjh]h 2’b01: is the same as 2’b11;}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKnhjubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubj)}(hC2'b10: count the events which sent to the uring (non-MATA) channel;h]h)}(hj5h]hE2’b10: count the events which sent to the uring (non-MATA) channel;}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKohj3ubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubj)}(h[2'b00: default value, count the events which sent to the both uring and uring_ext channel; h]h)}(hZ2'b00: default value, count the events which sent to the both uring and uring_ext channel;h]h\2’b00: default value, count the events which sent to the both uring and uring_ext channel;}(hjNhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKphjJubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubeh}(h]h ]h"]h$]h&]jbjcuh1jhhhKmhhhhubh)}(hX$Users could configure IDs to count data come from specific CCL/ICL, by setting srcid_cmd & srcid_msk, and data desitined for specific CCL/ICL by setting tgtid_cmd & tgtid_msk. A set bit in srcid_msk/tgtid_msk means the PMU will not check the bit when matching against the srcid_cmd/tgtid_cmd.h]hX$Users could configure IDs to count data come from specific CCL/ICL, by setting srcid_cmd & srcid_msk, and data desitined for specific CCL/ICL by setting tgtid_cmd & tgtid_msk. A set bit in srcid_msk/tgtid_msk means the PMU will not check the bit when matching against the srcid_cmd/tgtid_cmd.}(hjhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKshhhhubh)}(hIf all of these options are disabled, it can works by the default value that doesn't distinguish the filter condition and ID information and will return the total counter values in the PMU counters.h]hIf all of these options are disabled, it can works by the default value that doesn’t distinguish the filter condition and ID information and will return the total counter values in the PMU counters.}(hjvhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKxhhhhubh)}(hThe current driver does not support sampling. So "perf record" is unsupported. Also attach to a task is unsupported as the events are all uncore.h]hThe current driver does not support sampling. So “perf record” is unsupported. Also attach to a task is unsupported as the events are all uncore.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK|hhhhubh)}(hNote: Please contact the maintainer for a complete list of events supported for the PMU devices in the SoC and its information if needed.h]hNote: Please contact the maintainer for a complete list of events supported for the PMU devices in the SoC and its information if needed.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhhhubeh}(h]hisilicon-soc-uncore-pmu-driverah ]h"]hisilicon soc uncore pmu driverah$]h&]uh1hhhhhhhhKubeh}(h]4hisilicon-soc-uncore-performance-monitoring-unit-pmuah ]h"]6hisilicon soc uncore performance monitoring unit (pmu)ah$]h&]uh1hhhhhhhhKubeh}(h]h ]h"]h$]h&]sourcehuh1hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(hN generatorN datestampN source_linkN source_urlN toc_backlinksentryfootnote_backlinksK sectnum_xformKstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerjerror_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeenrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourceh _destinationN _config_files]7/var/lib/git/docbuild/linux/Documentation/docutils.confafile_insertion_enabled raw_enabledKline_length_limitM'pep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacesyntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformKsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_linkenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}refids}nameids}(jjjju nametypes}(jjuh}(jhjhu footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}Rparse_messages]transform_messages] transformerN include_log] decorationNhhub.