pmc-cloud-tools icon indicating copy to clipboard operation
pmc-cloud-tools copied to clipboard

Add support for some pre-skylake skus to tlbstat

Open chiluk opened this issue 6 years ago • 2 comments

Added support for some pre-skylake skus to tlbstat. Tested on Haswell, and Skylake. Basically this code checks for and adds support for the semi-equivalent PMCs to walk_active on older architectures, walk_duration.

chiluk avatar Oct 29 '18 19:10 chiluk

Recently ran into the same issue, would be very interested in seeing this merged!

I'm also wondering about the description of 'WALK_ACTIVE' vs 'WALK_DURATION' that exist in https://github.com/torvalds/linux/blob/master/tools/perf/pmu-events/arch/x86/skylake/virtual-memory.json and https://github.com/torvalds/linux/blob/master/tools/perf/pmu-events/arch/x86/haswell/virtual-memory.json , respectively.

More precisely, in the skylake model, the BriefDescription mentions:

Cycles when at least one PMH is busy with a page walk for a load. EPT page walk duration are excluded in Skylake.

Should this be taken as "pre-skylake models include the EPT page walks" ? If so, might it be needed to subtract the PAGE_WALKER_LOADS.EPT_(I|D)TLB_* values from the WALK_DURATION ones?

calin-iorgulescu avatar Dec 12 '18 14:12 calin-iorgulescu

Hopefully someone with more Intel PMC experience can chime in here, but given my reading of https://github.com/torvalds/linux/blob/master/tools/perf/pmu-events/arch/x86/haswell/virtual-memory.json, the PAGE_WALKER_LOADS.EPT_(I|D)TLB_* PMCs that you reference are counters and not durations, and hence shouldn't be included.

chiluk avatar Dec 12 '18 19:12 chiluk