Introduce GPU SVM and Xe SVM implementation
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v7 Latest32 patches 3 repliesIn review
- v632 patches 15 repliesSuperseded
- v532 patches 39 repliesSuperseded
Earlier versions · 4
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v4 | 33 patches | 66 replies | Superseded | |
| v3 | 30 patches | 20 replies | Superseded | |
| v2 | 29 patches | 96 replies | Superseded | |
| v1 RFC | 28 patches | 68 replies | Superseded |
Patches in v7 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/32 | drm/xe: Retry BO allocationdrivers/ | +7 | 0 replies | |
| 2/32 | mm/migrate: Add migrate_device_pfnsinclude/ mm/ | +38 | 0 replies | |
| 3/32 | mm/migrate: Trylock device page in do_swap_pagemm/ mm/ | +55 | 0 replies | |
| 4/32 | drm/pagemap: Add DRM pagemapinclude/ | +107 | 0 replies | |
| 5/32 | drm/xe/bo: Introduce xe_bo_put_asyncdrivers/ drivers/ drivers/ +1 more | +55 | 0 replies | |
| 6/32 | drm/gpusvm: Add support for GPU Shared Virtual Memorydrivers/ drivers/ drivers/ +1 more | +2755 | 0 replies | |
| 7/32 | drm/xe: Select DRM_GPUSVM Kconfigdrivers/ | +1 | 0 replies | |
| 8/32 | drm/xe/uapi: Add DRM_XE_VM_BIND_FLAG_CPU_ADDR_MIRRORdrivers/ drivers/ drivers/ +2 more | +176 | 0 replies | |
| 9/32 | drm/xe: Add SVM init / close / fini to faulting VMsdrivers/ drivers/ drivers/ +2 more | +128 | 0 replies | |
| 10/32 | drm/xe: Add dma_addr res cursordrivers/ drivers/ | +125 | 0 replies | |
| 11/32 | drm/xe: Nuke VM's mapping upon closedrivers/ drivers/ drivers/ +2 more | +73 | 0 replies | |
| 12/32 | drm/xe: Add SVM range invalidation and page faultdrivers/ drivers/ drivers/ +3 more | +328 | 0 replies | |
| 13/32 | drm/gpuvm: Add DRM_GPUVA_OP_DRIVERinclude/ | +5 | 0 replies | |
| 14/32 | drm/xe: Add (re)bind to SVM page fault handlerdrivers/ drivers/ drivers/ +4 more | +340 | 0 replies | |
| 15/32 | drm/xe: Add SVM garbage collectordrivers/ drivers/ drivers/ +1 more | +116 | 0 replies | |
| 16/32 | drm/xe: Add unbind to SVM garbage collectordrivers/ drivers/ drivers/ +2 more | +176 | 0 replies | |
| 17/32 | drm/xe: Do not allow CPU address mirror VMA unbind ifdrivers/ drivers/ drivers/ | +39 | 0 replies | |
| 18/32 | drm/xe: Enable CPU address mirror uAPIdrivers/ | +2 | 0 replies | |
| 19/32 | drm/xe/uapi: Add DRM_XE_QUERY_CONFIG_FLAG_HAS_CPU_ADDR_MIRRORdrivers/ include/ | +7 | 0 replies | |
| 20/32 | drm/xe: Add migrate layer functions for SVM supportdrivers/ drivers/ | +185 | 0 replies | |
| 21/32 | drm/xe: Add SVM device memory mirroringdrivers/ drivers/ drivers/ +2 more | +91 | 0 replies | |
| 22/32 | drm/xe: Add drm_gpusvm_devmem to xe_bodrivers/ | +4 | 0 replies | |
| 23/32 | drm/xe: Add drm_pagemap ops to SVMdrivers/ drivers/ | +63 | 0 replies | |
| 24/32 | drm/xe: Add GPUSVM device memory copy vfunc functionsdrivers/ | +152 | 0 replies | |
| 25/32 | drm/xe: Add Xe SVM populate_devmem_pfn GPU SVM vfuncdrivers/ | +40 | 0 replies | |
| 26/32 | drm/xe: Add Xe SVM devmem_release GPU SVM vfuncdrivers/ | +9 | 0 replies | |
| 27/32 | drm/xe: Add SVM VRAM migrationdrivers/ drivers/ | +98 | 0 replies | |
| 28/32 | drm/xe: Basic SVM BO evictiondrivers/ drivers/ drivers/ +1 more | +48 | 0 replies | |
| 29/32 | drm/xe: Add SVM debugdrivers/ drivers/ drivers/ | +92 | 0 replies | |
| 30/32 | drm/xe: Add modparam for SVM notifier sizedrivers/ drivers/ drivers/ | +8 | 0 replies | |
| 31/32 | drm/xe: Add always_migrate_to_vram modparamdrivers/ drivers/ drivers/ | +7 | 0 replies | |
| 32/32 | drm/doc: gpusvm: Add GPU SVM documentationDocumentation/ Documentation/ | +110 | 2 replies |
Reviews trailers per patch
All 32 patches have a Reviewed-by or Acked-by.
| Patch | Gwan-gyeong Mun | Stuart Summers | Alistair Popple | Thomas Hellström | Himal Prasad Ghimiray | Matthew Brost | Tejas Upadhyay |
|---|---|---|---|---|---|---|---|
| 1/32 | R-b | R-b | |||||
| 2/32 | R-b | R-b | |||||
| 3/32 | R-b T-b | ||||||
| 4/32 | R-b | R-b | |||||
| 5/32 | T-b R-b | R-b | R-b | ||||
| 6/32 | R-b | ||||||
| 7/32 | R-b | R-b | |||||
| 8/32 | R-b | R-b | |||||
| 9/32 | R-b | R-b | |||||
| 10/32 | R-b | ||||||
| 11/32 | R-b | ||||||
| 12/32 | R-b | R-b | |||||
| 13/32 | R-b | ||||||
| 14/32 | R-b T-b | ||||||
| 15/32 | R-b | R-b | |||||
| 16/32 | R-b | ||||||
| 17/32 | R-b | R-b | |||||
| 18/32 | R-b | ||||||
| 19/32 | R-b | R-b | R-b | ||||
| 20/32 | R-b | ||||||
| 21/32 | R-b | R-b | |||||
| 22/32 | R-b | R-b | |||||
| 23/32 | R-b | ||||||
| 24/32 | R-b | ||||||
| 25/32 | R-b | ||||||
| 26/32 | R-b | R-b | |||||
| 27/32 | R-b | R-b | |||||
| 28/32 | R-b | ||||||
| 29/32 | R-b | R-b | |||||
| 30/32 | R-b | R-b | |||||
| 31/32 | R-b | R-b | |||||
| 32/32 | A-b | 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 7 reviewers.
Cover letter [PATCH v7 00/32] Introduce GPU SVM and Xe SVM implementation
Version 7 of GPU SVM. Thanks to everyone (especially Sima, Thomas, Alistair, Himal) for their numerous reviews on revision 1, 2, 3 and for helping to address many design issues.
This version has been tested with IGT [1] on PVC, BMG, and LNL. Also tested with level0 (UMD) PR [2].
Major changes in v2:
- Dropped mmap write abuse
- core MM locking and retry loops instead of driver locking to avoid races
- Removed physical to virtual references
- Embedded structure/ops for drm_gpusvm_devmem
- Fixed mremap and fork issues
- Added DRM pagemap
- Included RFC documentation in the kernel doc
Major changes in v3:
- Move GPU SVM and DRM pagemap to DRM level
- Mostly addresses Thomas's feedback, lots of small changes documented in each individual patch change log
Major changes in v4:
- Pull documentation patch in
- Fix Kconfig / VRAM migration issue
- Address feedback which came out of internal multi-GPU implementation
Major changes in v5:
- Rebase on s/xe_mem_region/xe_vram_region
- Bit for uAPI has changed given PXP has landed
Major changes in v6:
- Fix selftest compile so GPU SVM compiles out on UML
Major changes in v7:
- Fix CI, addresses last nits, update GPU SVM doc
Known issues in v7:
- Check pages still exists, changed to threshold in this version which is better but still need to root cause cross process page finding on small user allocations.
Matt
[1] https://patchwork.freedesktop.org/series/137545/#rev3
[2] https://github.com/intel/compute-runtime/pull/782
Matthew Brost (28):
drm/xe: Retry BO allocation
mm/migrate: Add migrate_device_pfns
mm/migrate: Trylock device page in do_swap_page drm/gpusvm: Add support for GPU Shared Virtual Memory drm/xe: Select DRM_GPUSVM Kconfig
drm/xe/uapi: Add DRM_XE_VM_BIND_FLAG_CPU_ADDR_MIRROR drm/xe: Add SVM init / close / fini to faulting VMs drm/xe: Nuke VM's mapping upon close
drm/xe: Add SVM range invalidation and page fault drm/gpuvm: Add DRM_GPUVA_OP_DRIVER
drm/xe: Add (re)bind to SVM page fault handler drm/xe: Add SVM garbage collector
drm/xe: Add unbind to SVM garbage collector
drm/xe: Do not allow CPU address mirror VMA unbind if drm/xe: Enable CPU address mirror uAPI
drm/xe/uapi: Add DRM_XE_QUERY_CONFIG_FLAG_HAS_CPU_ADDR_MIRROR drm/xe: Add migrate layer functions for SVM support drm/xe: Add SVM device memory mirroring
drm/xe: Add drm_gpusvm_devmem to xe_bo
drm/xe: Add GPUSVM device memory copy vfunc functions drm/xe: Add Xe SVM populate_devmem_pfn GPU SVM vfunc drm/xe: Add Xe SVM devmem_release GPU SVM vfunc drm/xe: Add SVM VRAM migration
drm/xe: Basic SVM BO eviction
drm/xe: Add SVM debug
drm/xe: Add modparam for SVM notifier size
drm/xe: Add always_migrate_to_vram modparam drm/doc: gpusvm: Add GPU SVM documentation
Thomas Hellström (4):
drm/pagemap: Add DRM pagemap
drm/xe/bo: Introduce xe_bo_put_async
drm/xe: Add dma_addr res cursor
drm/xe: Add drm_pagemap ops to SVM
Documentation/gpu/rfc/gpusvm.rst | 106 + Documentation/gpu/rfc/index.rst | 4 + drivers/gpu/drm/Kconfig | 9 + drivers/gpu/drm/Makefile | 1 + drivers/gpu/drm/drm_gpusvm.c | 2236 +++++++++++++++++++ drivers/gpu/drm/xe/Kconfig | 10 + drivers/gpu/drm/xe/Makefile | 1 + drivers/gpu/drm/xe/xe_bo.c | 54 + drivers/gpu/drm/xe/xe_bo.h | 20 + drivers/gpu/drm/xe/xe_bo_types.h | 4 + drivers/gpu/drm/xe/xe_device.c | 3 + drivers/gpu/drm/xe/xe_device_types.h | 22 + drivers/gpu/drm/xe/xe_gt_pagefault.c | 18 +- drivers/gpu/drm/xe/xe_gt_tlb_invalidation.c | 22 + drivers/gpu/drm/xe/xe_gt_tlb_invalidation.h | 2 + drivers/gpu/drm/xe/xe_migrate.c | 175 ++ drivers/gpu/drm/xe/xe_migrate.h | 10 + drivers/gpu/drm/xe/xe_module.c | 7 + drivers/gpu/drm/xe/xe_module.h | 2 + drivers/gpu/drm/xe/xe_pt.c | 399 +++- drivers/gpu/drm/xe/xe_pt.h | 5 + drivers/gpu/drm/xe/xe_pt_types.h | 2 + drivers/gpu/drm/xe/xe_query.c | 5 +- drivers/gpu/drm/xe/xe_res_cursor.h | 123 +- drivers/gpu/drm/xe/xe_svm.c | 946 ++++++++ drivers/gpu/drm/xe/xe_svm.h | 150 ++ drivers/gpu/drm/xe/xe_tile.c | 5 + drivers/gpu/drm/xe/xe_vm.c | 381 +++- drivers/gpu/drm/xe/xe_vm.h | 15 +- drivers/gpu/drm/xe/xe_vm_types.h | 57 + include/drm/drm_gpusvm.h | 509 +++++ include/drm/drm_gpuvm.h | 5 + include/drm/drm_pagemap.h | 107 + include/linux/migrate.h | 1 + include/uapi/drm/xe_drm.h | 22 +- mm/memory.c | 13 +- mm/migrate_device.c | 116 +- 37 files changed, 5412 insertions(+), 155 deletions(-) create mode 100644 Documentation/gpu/rfc/gpusvm.rst create mode 100644 drivers/gpu/drm/drm_gpusvm.c create mode 100644 drivers/gpu/drm/xe/xe_svm.c create mode 100644 drivers/gpu/drm/xe/xe_svm.h create mode 100644 include/drm/drm_gpusvm.h create mode 100644 include/drm/drm_pagemap.h
Signature · 1 line
2.34.1