[PATCH v9 00/12] Fine grained fault locking, threaded prefetch, storm cache
Matthew Brost <[email protected]>
| Newsgroups | org.freedesktop.lists.intel-xe |
|---|---|
| Message-ID | <[email protected]> |
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(-)
--
2.34.1