summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/bin/stackcollapse-record
diff options
context:
space:
mode:
authorTales A. Mendonça <talesam@gmail.com>2026-09-22 11:46:34 -0300
committerMatthew Brost <matthew.brost@intel.com>2026-09-24 14:20:16 -0700
commitd5b0bf3f37f152583a884c696cf6caa152aa7ed5 (patch)
tree444d98085f892cf05dfe775ab183f66aea31ae67 /tools/perf/scripts/python/bin/stackcollapse-record
parentfc668a6e9c5f2d9800947bdd3d027f000030bcbc (diff)
downloadlinux-d5b0bf3f37f152583a884c696cf6caa152aa7ed5.tar.gz
linux-d5b0bf3f37f152583a884c696cf6caa152aa7ed5.zip
drm/xe: Implement Wa_22016122933
On platforms with a standalone media GT and media version 13.00 (MTL/ARL), memory shared between the CPU and the media GT's GuC must not be mapped cached on the CPU side: the CPU can otherwise read stale cache lines for data the GuC has already written. i915 implements this as Wa_22016122933 (see intel_gt_needs_wa_22016122933(), used by intel_guc_allocate_vma() and intel_gt_coherent_map_type()); xe never inherited it. The visible symptom on ARL is TLB invalidation acks stalling for a near-constant ~2.3s: the GuC writes the G2H ack in time, but the CPU keeps reading a stale (empty) view of the G2H CTB until the line is naturally evicted, so the fence timeout at 2.25s fires first. GuC log decode confirmed all invalidations were handled promptly by the firmware, and only the media GT was affected. See Link for the full investigation (three machines affected: 7d51, 7dd1, Arc Pro 130T). Making the mapping coherent instead of uncached does not help: with a GGTT PAT entry repurposed to WB|COH_2WAY the driver comes up and the media GT GuC runs, but the stalls remain (request-to-ack 2290ms). Uncached really is required here. Note that 2-way coherency is not normally reachable from a GGTT PTE (only 2 PAT bits), so that experiment needed a modified PAT table and may not reflect a supported configuration. Add the OOB workaround scoped like i915 (media version 13.00, media GT only - MEDIA_VERSION() OOB rules only match the media GT on standalone media platforms) and apply XE_BO_FLAG_NEEDS_UC to the GuC-shared allocations the CPU reads from: the CTBs, the GuC log, ADS, the SLPC shared data and the engine activity buffers. hwconfig and the G2G buffer are allocated on the primary GT only, where the workaround does not apply. Note that XE_BO_FLAG_NEEDS_UC drives both the CPU mapping (uncached) and the GGTT cache mode (XE_CACHE_NONE instead of XE_CACHE_WB), which is stricter than i915: i915 documents the workaround as WC on the CPU side and UC on the GPU side. A CPU-WC variant with the GGTT side kept at XE_CACHE_NONE was measured to be equally effective, but expressing it would require either a new BO flag or decoupling the GGTT cache-mode selection from XE_BO_FLAG_NEEDS_UC - simply swapping in XE_BO_FLAG_FORCE_WC silently relaxes the GPU side back to WB and the stalls return. The stricter mapping is kept here since it is the tested configuration and no throughput difference between the two was measurable; the extra plumbing can be added later if parity with i915 is preferred. Scope is limited to the GuC-shared allocations, which is where the failures were observed. i915 additionally covers media-GT LRC/ring state; extending xe to match can be done as a follow-up if wanted. Validation on two ARL machines (7d51 and 7dd1): before, 20-60 TLB invalidation ack stalls per day, every day, for weeks, on every kernel and on two GuC firmware versions (70.53.0 and 70.72.1). After: zero stalls in six weeks of combined runtime, over 10M TLB invalidations processed under the same workloads, across kernels 7.1.6, 7.1.8 and 7.2. The 7dd1 machine, which could not survive a day of media workloads on xe without a platform freeze, has been running xe full time since 11 August, including days with heavy video transcoding, with zero stalls and zero freezes. The coherency experiment, the CPU-WC measurements and the engine activity coverage gap were found by Navon John Lukose while A/B testing v2 on an ARL 7d51. Link: https://gitlab.freedesktop.org/drm/xe/kernel/-/work_items/8678 Suggested-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com> Signed-off-by: Tales A. Mendonça <talesam@gmail.com> Tested-by: Navon John Lukose <navonjohnlukose@gmail.com> Reviewed-by: Matthew Brost <matthew.brost@intel.com> Signed-off-by: Matthew Brost <matthew.brost@intel.com> Link: https://patch.msgid.link/20260922144634.55130-4-talesam@gmail.com
Diffstat (limited to 'tools/perf/scripts/python/bin/stackcollapse-record')
0 files changed, 0 insertions, 0 deletions