RFC Introduce a ww transaction utility
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v2 RFC Latest2 patches 2 repliesIn review
- v1 RFC2 patches 0 repliesSuperseded
Patches in v2 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | drm/i915: Break out dma_resv ww locking utilities to separate filesdrivers/ drivers/ drivers/ +4 more | +98 | 0 replies | |
| 2/2 | drm/i915: Introduce a i915_gem_do_ww(){} utilitydrivers/ drivers/ drivers/ +1 more | +130 | 2 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.
Cover letter [Intel-gfx] [RFC PATCH v2 0/2] Introduce a ww transaction utility
A ww transaction utility intended to help removing the obj->mm.lock from the driver and introduce ww transactions in a robust way.
Patch 1/2 breaks the current i915 utilities out to separate files Patch 2/2 introduces the ww transaction utility
A similar utility could easily be introduced in the core ww_mutex code, allowing even for cross-driver ww transactions, and the template argument could then allow for per-ww-class derived ww_acquire_mutex types. To facilitate a core implementation, (since we can never guarantee the contended lock stays alive), we'd need a
void ww_mutex_relax(struct ww_acquire_ctx *)
and its interruptible variant that does the equivalent of locking and unlocking the contended mutex.
With this driver implementation, we can extend the code to take a reference on the object containing the contended lock to make sure it stays alive.
Finally, the drawback of the current implementation is the use of the hash table and corresponding performance cost, but as mentioned in patch 2, a core variant could probably do this in a much more efficient way.
v2: Version 1 of patch 2 was obviously a WIP patch. Fix that.
_______________________________________________
Intel-gfx mailing list [email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx