rust: drm: gpuvm: implement Send and Sync for refcounted handles
Status from this message: Merged into drm-rust-next. Thanks!
Get series with b4
b4 am [email protected] change-id 20260611-gpuvm-sync-send-aa47a9001ae6Versions newest first · linked by author and title
- v4 Latest2 patches 1 replyApplied
- v32 patches 2 repliesSuperseded
- v21 patch 0 repliesSuperseded
Earlier versions · 1
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v1 | 1 patch | 0 replies | Superseded |
Changes in v4 from the cover letter
- Moved the bounds to the DriverGpuVm trait as discussed in the v3 thread, and reordered the series.
- Added Send for VaData as pointed out by Sashiko again.
- Rebased on top of Deborah's DeviceContext patch.
Patches in v4 Applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | rust: drm: gpuvm: require Send + Sync for the driver's associated datarust/ | +15 | 0 replies | |
| 2/2 | rust: drm: gpuvm: implement Send and Sync for GpuVaAlloc and GpuVmBorust/ rust/ | +17 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v4 yet.
Cover letter [PATCH v4 0/2] rust: drm: gpuvm: implement Send and Sync for refcounted handles
Hi folks,
GpuVaAlloc and GpuVmBo implement neither Send or Sync, so drivers that move them between threads need their own unsafe impls. GpuVm implements both unconditionally, which Sashiko points out is unsound.
Path 1 requires Send + Sync on DriverGpuVm and its associated data instead of bounding each impl separately, as discussed in the v3 thread. Patch 2 adds bounds for GpuVaAlloc and GpuVmBo.
This series is based on Deborah's DeviceContext patch as they would otherwise conflict:
https://lore.kernel.org/rust-for-linux/[email protected]/
Sami
---
v4:
- Moved the bounds to the DriverGpuVm trait as discussed in the v3 thread, and reordered the series.
- Added Send for VaData as pointed out by Sashiko again.
- Rebased on top of Deborah's DeviceContext patch.
v3:
- Added a patch for GpuVm, and changed GpuVmBo bounds based on another Sashiko analysis.
v2:
- Added a missing T::Object: Send + Sync bound pointed out by Sashiko.
---
Sami Tolvanen (2):
rust: drm: gpuvm: require Send + Sync for the driver's associated data
rust: drm: gpuvm: implement Send and Sync for GpuVaAlloc and GpuVmBo
rust/kernel/drm/gpuvm/mod.rs | 26 +++++++++++++++----------- rust/kernel/drm/gpuvm/va.rs | 8 ++++++++ rust/kernel/drm/gpuvm/vm_bo.rs | 9 +++++++++ 3 files changed, 32 insertions(+), 11 deletions(-)
---
base-commit: 550dc7536644db2d67c6f8cf525bba682fba08d9
change-id: 20260611-gpuvm-sync-send-aa47a9001ae6
prerequisite-change-id: 20260610-gpuvm_device_context_v1-367c21f94e1e:v1
prerequisite-patch-id: eb2074676db5d923c8505208388fd1c0dba58b6a