Fine grained fault locking, threaded prefetch, storm cache
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v9 Latest12 patches 3 repliesIn review
- v812 patches 12 repliesSuperseded
- v712 patches 0 repliesSuperseded
Earlier versions · 9
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v6 | 12 patches | 0 replies | Superseded | |
| v5 | 12 patches | 0 replies | Superseded | |
| v4 posting 2/2 | 12 patches | 22 replies | Superseded | |
| v3 posting 2/2 | 12 patches | 0 replies | Superseded | |
| v2 posting 2/2 | 12 patches | 0 replies | Superseded | |
| v4 posting 1/2 | 7 patches | 13 replies | Superseded | |
| v3 posting 1/2 | 7 patches | 4 replies | Superseded | |
| v2 posting 1/2 | 7 patches | 4 replies | Superseded | |
| v1 | 11 patches | 37 replies | Superseded |
Changes in v9 from the cover letter
- Use -ENODATA on races
- Minor style, comment cleanups
Patches in v9 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/12 | drm/xe: Fine grained page fault lockingdrivers/ drivers/ drivers/ +4 more | +300 | 0 replies | |
| 2/12 | drm/xe: Allow prefetch-only VM bind IOCTLs to use VM read lockdrivers/ drivers/ | +33 | 0 replies | |
| 3/12 | drm/xe: Thread prefetch of SVM rangesdrivers/ drivers/ drivers/ +4 more | +167 | 1 reply | |
| 4/12 | drm/xe: Use a single page-fault queue with multiple workersdrivers/ drivers/ drivers/ | +49 | 0 replies | |
| 5/12 | drm/xe: Add num_pf_work modparamdrivers/ drivers/ drivers/ +4 more | +28 | 0 replies | |
| 6/12 | drm/xe: Engine class and instance into a u8drivers/ drivers/ drivers/ +1 more | +24 | 0 replies | |
| 7/12 | drm/xe: Track pagefault worker runtimedrivers/ drivers/ drivers/ | +12 | 0 replies | |
| 8/12 | drm/xe: Chain page faults via queue-resident cache to avoid fault stormsdrivers/ drivers/ drivers/ +2 more | +527 | 1 reply | |
| 9/12 | drm/xe: Add pagefault chaining statsdrivers/ drivers/ drivers/ | +38 | 0 replies | |
| 10/12 | drm/xe: Add debugfs pagefault_infodrivers/ drivers/ drivers/ | +81 | 0 replies | |
| 11/12 | drm/xe: batch CT pagefault acks with periodic flushdrivers/ drivers/ drivers/ +3 more | +172 | 1 reply | |
| 12/12 | drm/xe: Track parallel page fault activity in GT statsdrivers/ drivers/ drivers/ | +21 | 0 replies |
Reviews trailers per patch
All 12 patches have a Reviewed-by or Acked-by.
| Patch | Maciej Patelczyk | Francois Dugast | Gwan-gyeong Mun |
|---|---|---|---|
| 1/12 | R-b | ||
| 2/12 | R-b | ||
| 3/12 | R-b | ||
| 4/12 | R-b | ||
| 5/12 | R-b | ||
| 6/12 | R-b | ||
| 7/12 | R-b | ||
| 8/12 | R-b | ||
| 9/12 | R-b | ||
| 10/12 | R-b | ||
| 11/12 | R-b | ||
| 12/12 | 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 v9 00/12] Fine grained fault locking, threaded prefetch, storm cache
Fine-grained fault locking provides immediate benefits: it allows page faults from the same VM to be processed in parallel (unless they target the same range) and enables a sane multi-threaded prefetch implementation. UMD prefetch benchmarks see 10% to 50% improvement in prefetch performance on BMG depending on PCIe bus speed.
Once parallel fault processing is available, the pagefault queue can be unified into a single queue with multiple workers pulling faults to process. A single queue then allows a sensible pagefault cache to be implemented, so that multiple faults targeting the same region can be batched together and acknowledged in, ideally, a single pass. This saves CPU cycles during pagefault handling and improves overall throughput of the fault handler.
Significant improvements in UMD pagefault benchmarks can be seen when utilizing this caching.
v3:
- Fix kunit build (CI)
v4:
- Actually fix kunit build (CI)
v5:
- Address v4 feedback, rebase, fix several CI bugs
v6:
- Address Sashiko feedback: https://sashiko.dev/#/patchset/20260723214743.1498125-1-matthew.brost%40intel.com
- CI fixes
v7:
- Dedicated prefetch work queue (Sashiko, arch choice)
- Clean up unwind paths (Sashiko)
v8:
- Still fighting valid Sashiko issues (unwind, locking issues, reset flows)
v9:
- Use -ENODATA on races
- Minor style, comment cleanups
Matt
Matthew Brost (12):
drm/xe: Fine grained page fault locking
drm/xe: Allow prefetch-only VM bind IOCTLs to use VM read lock drm/xe: Thread prefetch of SVM ranges
drm/xe: Use a single page-fault queue with multiple workers drm/xe: Add num_pf_work modparam
drm/xe: Engine class and instance into a u8
drm/xe: Track pagefault worker runtime
drm/xe: Chain page faults via queue-resident cache to avoid fault
storms
drm/xe: Add pagefault chaining stats
drm/xe: Add debugfs pagefault_info
drm/xe: batch CT pagefault acks with periodic flush drm/xe: Track parallel page fault activity in GT stats
drivers/gpu/drm/xe/xe_debugfs.c | 11 + drivers/gpu/drm/xe/xe_defaults.h | 1 + drivers/gpu/drm/xe/xe_device.c | 14 +- drivers/gpu/drm/xe/xe_device_types.h | 23 +- drivers/gpu/drm/xe/xe_gt_stats.c | 7 + drivers/gpu/drm/xe/xe_gt_stats_types.h | 22 + drivers/gpu/drm/xe/xe_guc_ct.c | 95 +++- drivers/gpu/drm/xe/xe_guc_ct.h | 38 +- drivers/gpu/drm/xe/xe_guc_pagefault.c | 39 +- drivers/gpu/drm/xe/xe_guc_types.h | 6 + drivers/gpu/drm/xe/xe_module.c | 4 + drivers/gpu/drm/xe/xe_module.h | 1 + drivers/gpu/drm/xe/xe_pagefault.c | 689 ++++++++++++++++++++---- drivers/gpu/drm/xe/xe_pagefault.h | 74 +++ drivers/gpu/drm/xe/xe_pagefault_types.h | 112 +++- drivers/gpu/drm/xe/xe_pt.c | 6 + drivers/gpu/drm/xe/xe_svm.c | 146 +++-- drivers/gpu/drm/xe/xe_svm.h | 59 +- drivers/gpu/drm/xe/xe_userptr.c | 19 +- drivers/gpu/drm/xe/xe_vm.c | 298 +++++++--- drivers/gpu/drm/xe/xe_vm_types.h | 42 +- 21 files changed, 1397 insertions(+), 309 deletions(-)
Signature · 1 line
2.34.1