Bug 1412950

Summary: [RHEL7][RFE] Support of the Intel Xeon PHI KNL in libpfm
Product: Red Hat Enterprise Linux 7 Reporter: Renaud Marigny <rmarigny>
Component: libpfmAssignee: William Cohen <wcohen>
Status: CLOSED ERRATA QA Contact: Michael Petlan <mpetlan>
Severity: high Docs Contact:
Priority: high    
Version: 7.3CC: bgollahe, mbenitez, mcermak, mnewsome, mpetlan, rmarigny
Target Milestone: rcKeywords: FutureFeature
Target Release: 7.4   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: libpfm-4.7.0-3.el7 Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-08-01 12:40:02 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1390370, 1412952, 1446211    
Attachments:
Description Flags
knl page-walks umask description fix none

Comment 2 William Cohen 2017-01-13 15:49:08 UTC
It looks like newer RHEL 7 kernels have included identification and pmu events for Intel KNL.  The remaining question is whether people at RH have access to KNL machine to verify functionality of the papi and libpfm support.

Comment 5 William Cohen 2017-03-21 19:53:36 UTC
Intel KNL Support added to libpfm-4.7.0-2.el7.

Comment 7 William Cohen 2017-03-23 17:32:37 UTC
Two of the back ported patches related to Intel KNL changed the layout of the struct pfm_event_attr_info_t (https://sourceforge.net/p/perfmon2/mailman/message/35744830/).  There was an expansion of the idx field from 32-bits to 64-bit to store larger raw unit masks for offcore events.  To keep abi with the older libpfm-4.7 the idx field has been limited to 32-bit.  Thus, any offcore events that are using bits 32-38 in the mask are not going to operate correctly.  Events that will not work properly include:

knl::offcore_response_0:any_request:ddr_near
knl::offcore_response_0:any_request:L2_HIT_NEAR_TILE:L2_HIT_FAR_TILE
knl::offcore_response_0:dmnd_data_rd:outstanding

hsw_ep::offcore_response_0:any_data:L3_miss_remote
bdw_ep::offcore_response_1:l3_miss_remote
bdw_ep::offcore_response_0:l3_miss

glm::offcore_response_0:outstanding:dmnd_data_rd:u
glm::offcore_response_0:strm_st:outstanding
glm::offcore_response_1:any_rfo:l2_miss_snp_miss_or_no_snoop_needed

skl::offcore_response_0:l3_miss

Comment 8 Michael Petlan 2017-05-10 13:00:07 UTC
The patches look OK. I have tested that libpfm-4.7.0-4.el7 knows about knl PMUs.

$ examples/showevtinfo | grep knl
	[203, knl, "Intel Knights Landing"]
	[204, knl_unc_imc0, "Intel KnightLanding IMC 0 uncore"]
	[205, knl_unc_imc1, "Intel KnightLanding IMC 1 uncore"]
	[206, knl_unc_imc2, "Intel KnightLanding IMC 2 uncore"]
	[207, knl_unc_imc3, "Intel KnightLanding IMC 3 uncore"]
	[208, knl_unc_imc4, "Intel KnightLanding IMC 4 uncore"]
	[209, knl_unc_imc5, "Intel KnightLanding IMC 5 uncore"]
	[210, knl_unc_imc_uclk0, "Intel KnightLanding IMC UCLK 0 uncore"]
	[211, knl_unc_imc_uclk1, "Intel KnightLanding IMC UCLK 1 uncore"]
	[212, knl_unc_edc_eclk0, "Intel KnightLanding EDC_ECLK_0 uncore"]
	[213, knl_unc_edc_eclk1, "Intel KnightLanding EDC_ECLK_1 uncore"]
	[214, knl_unc_edc_eclk2, "Intel KnightLanding EDC_ECLK_2 uncore"]
	[215, knl_unc_edc_eclk3, "Intel KnightLanding EDC_ECLK_3 uncore"]
	[216, knl_unc_edc_eclk4, "Intel KnightLanding EDC_ECLK_4 uncore"]
	[217, knl_unc_edc_eclk5, "Intel KnightLanding EDC_ECLK_5 uncore"]
	[218, knl_unc_edc_eclk6, "Intel KnightLanding EDC_ECLK_6 uncore"]
	[219, knl_unc_edc_eclk7, "Intel KnightLanding EDC_ECLK_7 uncore"]
	[220, knl_unc_edc_uclk0, "Intel KnightLanding EDC_UCLK_0 uncore"]
	[221, knl_unc_edc_uclk1, "Intel KnightLanding EDC_UCLK_1 uncore"]
	[222, knl_unc_edc_uclk2, "Intel KnightLanding EDC_UCLK_2 uncore"]
	[223, knl_unc_edc_uclk3, "Intel KnightLanding EDC_UCLK_3 uncore"]
	[224, knl_unc_edc_uclk4, "Intel KnightLanding EDC_UCLK_4 uncore"]
	[225, knl_unc_edc_uclk5, "Intel KnightLanding EDC_UCLK_5 uncore"]
	[226, knl_unc_edc_uclk6, "Intel KnightLanding EDC_UCLK_6 uncore"]
	[227, knl_unc_edc_uclk7, "Intel KnightLanding EDC_UCLK_7 uncore"]
	[228, knl_unc_cha0, "Intel KnightLanding CHA 0 uncore"]
	[229, knl_unc_cha1, "Intel KnightLanding CHA 1 uncore"]
	[230, knl_unc_cha2, "Intel KnightLanding CHA 2 uncore"]
	[231, knl_unc_cha3, "Intel KnightLanding CHA 3 uncore"]
	[232, knl_unc_cha4, "Intel KnightLanding CHA 4 uncore"]
	[233, knl_unc_cha5, "Intel KnightLanding CHA 5 uncore"]
	[234, knl_unc_cha6, "Intel KnightLanding CHA 6 uncore"]
	[235, knl_unc_cha7, "Intel KnightLanding CHA 7 uncore"]
	[236, knl_unc_cha8, "Intel KnightLanding CHA 8 uncore"]
	[237, knl_unc_cha9, "Intel KnightLanding CHA 9 uncore"]
	[238, knl_unc_cha10, "Intel KnightLanding CHA 10 uncore"]
	[239, knl_unc_cha11, "Intel KnightLanding CHA 11 uncore"]
	[240, knl_unc_cha12, "Intel KnightLanding CHA 12 uncore"]
	[241, knl_unc_cha13, "Intel KnightLanding CHA 13 uncore"]
	[242, knl_unc_cha14, "Intel KnightLanding CHA 14 uncore"]
	[243, knl_unc_cha15, "Intel KnightLanding CHA 15 uncore"]
	[244, knl_unc_cha16, "Intel KnightLanding CHA 16 uncore"]
	[245, knl_unc_cha17, "Intel KnightLanding CHA 17 uncore"]
	[246, knl_unc_cha18, "Intel KnightLanding CHA 18 uncore"]
	[247, knl_unc_cha19, "Intel KnightLanding CHA 19 uncore"]
	[248, knl_unc_cha20, "Intel KnightLanding CHA 20 uncore"]
	[249, knl_unc_cha21, "Intel KnightLanding CHA 21 uncore"]
	[250, knl_unc_cha22, "Intel KnightLanding CHA 22 uncore"]
	[251, knl_unc_cha23, "Intel KnightLanding CHA 23 uncore"]
	[252, knl_unc_cha24, "Intel KnightLanding CHA 24 uncore"]
	[253, knl_unc_cha25, "Intel KnightLanding CHA 25 uncore"]
	[254, knl_unc_cha26, "Intel KnightLanding CHA 26 uncore"]
	[255, knl_unc_cha27, "Intel KnightLanding CHA 27 uncore"]
	[256, knl_unc_cha28, "Intel KnightLanding CHA 28 uncore"]
	[257, knl_unc_cha29, "Intel KnightLanding CHA 29 uncore"]
	[258, knl_unc_cha30, "Intel KnightLanding CHA 30 uncore"]
	[259, knl_unc_cha31, "Intel KnightLanding CHA 31 uncore"]
	[260, knl_unc_cha32, "Intel KnightLanding CHA 32 uncore"]
	[261, knl_unc_cha33, "Intel KnightLanding CHA 33 uncore"]
	[262, knl_unc_cha34, "Intel KnightLanding CHA 34 uncore"]
	[263, knl_unc_cha35, "Intel KnightLanding CHA 35 uncore"]
	[264, knl_unc_cha36, "Intel KnightLanding CHA 36 uncore"]
	[265, knl_unc_cha37, "Intel KnightLanding CHA 37 uncore"]
	[267, knl_unc_m2pcie, "Intel Knights Landing M2PCIe uncore"]

It prints some events too:

$ LIBPFM_FORCE_PMU=knl showevtinfo | grep ^Name
Name     : UNHALTED_CORE_CYCLES
Name     : UNHALTED_REFERENCE_CYCLES
Name     : INSTRUCTION_RETIRED
Name     : INSTRUCTIONS_RETIRED
Name     : LLC_REFERENCES
Name     : LAST_LEVEL_CACHE_REFERENCES
Name     : LLC_MISSES
Name     : LAST_LEVEL_CACHE_MISSES
Name     : BRANCH_INSTRUCTIONS_RETIRED
Name     : MISPREDICTED_BRANCH_RETIRED
Name     : ICACHE
Name     : UOPS_RETIRED
Name     : INST_RETIRED
Name     : CYCLES_DIV_BUSY
Name     : RS_FULL_STALL
Name     : L2_REQUESTS
Name     : MACHINE_CLEARS
Name     : BR_INST_RETIRED
Name     : BR_MISP_RETIRED
Name     : MS_DECODED
Name     : FETCH_STALL
Name     : BACLEARS
Name     : NO_ALLOC_CYCLES
Name     : CPU_CLK_UNHALTED
Name     : MEM_UOPS_RETIRED
Name     : PAGE_WALKS
Name     : L2_REQUESTS_REJECT
Name     : CORE_REJECT_L2Q
Name     : RECYCLEQ
Name     : OFFCORE_RESPONSE_0
Name     : OFFCORE_RESPONSE_1

I am not sure whether the above events are complete set, whether they are correct, etc. I am going to test this in future too, however, from my side, the PMU support the bug asks for is there.

Comment 10 Michael Petlan 2017-05-17 12:04:13 UTC
Created attachment 1279676 [details]
knl page-walks umask description fix

I have noticed that the umask description of page-walks is incorrect. Just a cosmetic thing, but still... Patch is attached.

Comment 11 Michael Petlan 2017-06-13 15:27:36 UTC
The cosmetic patch from comment #10 does not seem to be upstream yet, but it does not matter now, since it does not have any impact on functionality, just on what the user reads on the output.

Testing shows that Knights Landing support is present in libpfm-4.7.0-4.el7.

VERIFIED

Comment 13 errata-xmlrpc 2017-08-01 12:40:02 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2017:2190