Add support for EU stall sampling
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v12 Latest8 patches 6 repliesIn review
- v118 patches 3 repliesSuperseded
- v108 patches 14 repliesSuperseded
Earlier versions · 8
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v9 | 8 patches | 29 replies | Superseded | |
| v8 | 7 patches | 33 replies | Superseded | |
| v7 | 7 patches | 1 reply | Superseded | |
| v6 | 7 patches | 12 replies | Superseded | |
| v5 | 7 patches | 5 replies | Superseded | |
| v4 | 5 patches | 16 replies | Superseded | |
| v3 | 1 patch | 10 replies | Superseded | |
| v1 RFC | 1 patch | 0 replies | Superseded |
Patches in v12 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/8 | drm/xe/topology: Add a function to find the index of the last enabled DSS in a maskdrivers/ | +13 | 0 replies | |
| 2/8 | drm/xe/uapi: Introduce API for EU stall samplingdrivers/ drivers/ drivers/ +2 more | +285 | 2 replies | |
| 3/8 | drm/xe/eustall: Add support to init, enable and disable EU stall samplingdrivers/ drivers/ drivers/ +2 more | +409 | 0 replies | |
| 4/8 | drm/xe/eustall: Add support to read() and poll() EU stall datadrivers/ drivers/ | +294 | 2 replies | |
| 5/8 | drm/xe/eustall: Add support to handle dropped EU stall datadrivers/ | +45 | 0 replies | |
| 6/8 | drm/xe/eustall: Add EU stall sampling support for Xe2drivers/ | +32 | 0 replies | |
| 7/8 | drm/xe/uapi: Add a device query to get EU stall sampling informationdrivers/ drivers/ drivers/ +1 more | +131 | 0 replies | |
| 8/8 | drm/xe/eustall: Add workaround 22016596838 which applies to PVC.drivers/ drivers/ | +11 | 0 replies |
Reviews trailers per patch
All 8 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.
| Patch | Ashutosh Dixit | Ben Olson | Felix Degrood |
|---|---|---|---|
| Series | R-b | R-b | A-b |
| 1/8 | R-b | ||
| 2/8 | R-b | ||
| 3/8 | R-b | ||
| 4/8 | R-b | ||
| 5/8 | R-b | ||
| 6/8 | R-b | ||
| 7/8 | R-b | ||
| 8/8 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.
Cover letter [PATCH v12 0/8] Add support for EU stall sampling
The following patch series add support for EU stall sampling, a new hardware feature first added in PVC and is being supported in XE2 and later architecture GPUs. This feature would enable capturing of EU stall data which include the IP address of the instruction stalled and various stall reason counts.
Support for this feature is being added into Mesa:
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30142
New IGT tests for EU stall sampling are being added:
https://patchwork.freedesktop.org/series/143030/
This patch series has undergone basic testing with the new IGT tests.
Issues that need investigation:
1. Blocked reads with small user buffers may be blocked even with EU stall data in the kernel buffer as a previous read has set pollin to false even when kernel buffer has data that could be read but the user buffer is too small to read all the data.
Thank You.
v12 a. Move check for EU stall support to a header file
b. Move 'goto exit_drop;' to the next if statement
v11 a. Lock optimization
b. Moved around code as per review feedback
v10 a. Fixed error rewinding code
b. Used cancel_delayed_work_sync() instead of flush_delayed_work() c. Replaced per xecore lock with a lock for all the xecore buffers d. Remove function description for static functions.
e. Use extension number while parsing chain of extensions.
f. Moved code around as per review feedback
v9: a. Split the big patch in v8 into two patches
b. Moved all drop data handling code into one patch
c. Several other code improvements as mentioned in the patches
v8: a. Used div_u64() instead of / to fix 32-bit build issue.
b. Changed copyright year in new files to 2025.
c. Renamed struct drm_xe_eu_stall_data_pvc to struct xe_eu_stall_data_pvc d. Renamed struct drm_xe_eu_stall_data_xe2 to struct xe_eu_stall_data_xe2
v7: a. Renamed input property DRM_XE_EU_STALL_PROP_EVENT_REPORT_COUNT
to DRM_XE_EU_STALL_PROP_WAIT_NUM_REPORTS to be consistent with OA. Renamed the corresponding internal variables.
b. Fixed some commit messages based on review feedback. c. Changed sampling_rates from a pointer to flexible array.
v6: a. Changed the uAPI input to accept sampling rate in GPU cycles
instead of sampling rate multiplier.
b. Fix buffer wrap around over write bug (Matt Olson).
c. Include EU stall sampling rates information and per XeCore buffer size in the query information.
v5: Addressed review feedback from v4 including
a. Removed DRM_XE_EU_STALL_PROP_POLL_PERIOD from the uAPI (Ashutosh)
b. Separated the patches for Xe_HPC and Xe2 (Matt R)
c. Moved read() returning -EIO into a separate patch
d. Removed spinlocks around set_bit() and clear_bit() (Matt R)
e. Renamed several variables, structures and enums (Ashutosh and
Matt R)
f. Addressed other review feedback.
v4: Addressed review feedback from v3 including
a. Split the patch into multiple patches (Matt R)
b. Added a new device query to get EU stall info (Ashutosh)
c. Renamed all Dss to xecore (Matt R)
d. Removed buffer size and disable at open input properties. (Matt R)
e. Removed the "_SHIFT" macros (Matt R)
f. Allocate the EU stall buffer only on system memory.
g. Changed the work arounds to OOB (Matt R)
h. Other review feedback.
v3: a. Removed data header and changed read() to return -EIO when data is dropped by the HW.
b. Added a new DRM_XE_OBSERVATION_IOCTL_INFO to query EU stall data record info c. Added struct drm_xe_eu_stall_data_pvc and struct drm_xe_eu_stall_data_xe2
to xe_drm.h. These declarations would help user space to parse the
EU stall data
d. Addressed other review comments from v2
v2: Rename xe perf layer as xe observation layer (Ashutosh)
Test-with: [email protected]
Harish Chegondi (8):
drm/xe/topology: Add a function to find the index of the last enabled
DSS in a mask
drm/xe/uapi: Introduce API for EU stall sampling drm/xe/eustall: Add support to init, enable and disable EU stall
sampling
drm/xe/eustall: Add support to read() and poll() EU stall data drm/xe/eustall: Add support to handle dropped EU stall data drm/xe/eustall: Add EU stall sampling support for Xe2 drm/xe/uapi: Add a device query to get EU stall sampling information drm/xe/eustall: Add workaround 22016596838 which applies to PVC.
drivers/gpu/drm/xe/Makefile | 1 + drivers/gpu/drm/xe/regs/xe_eu_stall_regs.h | 29 + drivers/gpu/drm/xe/xe_eu_stall.c | 960 +++++++++++++++++++++ drivers/gpu/drm/xe/xe_eu_stall.h | 24 + drivers/gpu/drm/xe/xe_gt.c | 5 + drivers/gpu/drm/xe/xe_gt_topology.h | 13 + drivers/gpu/drm/xe/xe_gt_types.h | 3 + drivers/gpu/drm/xe/xe_observation.c | 14 + drivers/gpu/drm/xe/xe_query.c | 43 + drivers/gpu/drm/xe/xe_trace.h | 30 + drivers/gpu/drm/xe/xe_wa_oob.rules | 1 + include/uapi/drm/xe_drm.h | 74 ++ 12 files changed, 1197 insertions(+) create mode 100644 drivers/gpu/drm/xe/regs/xe_eu_stall_regs.h create mode 100644 drivers/gpu/drm/xe/xe_eu_stall.c create mode 100644 drivers/gpu/drm/xe/xe_eu_stall.h
Signature · 1 line
2.48.1