RFC Emulated coherent graphics memory take 2
Get series with b4
b4 am [email protected]Versions newest first
- v1 RFC Latest7 patches 6 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/7 | mm: Add write-protect and clean utilities for address space rangesMAINTAINERS include/ mm/ +2 more | +409 | 1 reply | |
| 2/7 | drm/ttm: Allow the driver to provide the ttm struct vm_operations_structdrivers/ drivers/ include/ | +10 | 0 replies | |
| 3/7 | drm/ttm: TTM fault handler helpersdrivers/ include/ | +114 | 2 replies | |
| 4/7 | drm/vmwgfx: Implement an infrastructure for write-coherent resourcesdrivers/ drivers/ drivers/ +8 more | +592 | 0 replies | |
| 5/7 | drm/vmwgfx: Use an RBtree instead of linked list for MOB resourcesdrivers/ drivers/ drivers/ +1 more | +38 | 0 replies | |
| 6/7 | drm/vmwgfx: Implement an infrastructure for read-coherent resourcesdrivers/ drivers/ drivers/ +2 more | +179 | 0 replies | |
| 7/7 | drm/vmwgfx: Add surface dirty-tracking callbacksdrivers/ drivers/ drivers/ +1 more | +629 | 0 replies |
Reviews trailers per patch
All 7 patches have a Reviewed-by or Acked-by.
| Patch | Christian König | Deepak Rawat | Ralph Campbell |
|---|---|---|---|
| 1/7 | R-b | ||
| 2/7 | R-b | ||
| 3/7 | R-b | ||
| 4/7 | R-b | ||
| 5/7 | R-b | ||
| 6/7 | R-b | ||
| 7/7 | 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 [RFC PATCH 0/7] Emulated coherent graphics memory take 2
From: Thomas Hellström <[email protected]>
Graphics APIs like OpenGL 4.4 and Vulkan require the graphics driver to provide coherent graphics memory, meaning that the GPU sees any content written to the coherent memory on the next GPU operation that touches that memory, and the CPU sees any content written by the GPU to that memory immediately after any fence object trailing the GPU operation has signaled.
Paravirtual drivers that otherwise require explicit synchronization needs to do this by hooking up dirty tracking to pagefault handlers and buffer object validation.
The mm patch page walk interface has been reworked to be similar to the reworked page-walk code (mm/pagewalk.c). There have been two other solutions to consider:
1) Using the page-walk code. That is currently not possible since it requires the mmap-sem to be held for the struct vm_area_struct vm_flags and for huge page splitting. The pagewalk code in this patchset can't hold the mmap sems since it will lead to locking inversion. Instead it uses an operation mode similar to unmap_mapping_range where the i_mmap_lock is held.
2) Using apply_to_page_range(). The primary use of this code is to fill page tables. The operation modes are IMO sufficiently different to motivate re-implementing the page-walk.
For the TTM changes they are hopefully in line with the long-term strategy of making helpers out of what's left of TTM.
The code has been tested and exercised by a tailored version of mesa where we disable all explicit synchronization and assume graphics memory is coherent. The performance loss varies of course; a typical number is around 5%.
I would like to merge this code through the DRM tree, so an ack to do that from an mm maintainer would be greatly appreciated.