drm/ttm: Use init_on_free to delay release TTM BOs
Subsystems (3)
PATCH v2 1/1 drm/ttm: Use init_on_free to delay release TTM BOs
Delay release TTM BOs when the kernel default setting is init_on_free. This offloads the overhead of clearing the system memory to the work item and potentially a different CPU. This could be very beneficial when the application does a lot of malloc/free style allocations of system memory.
Reviewed-by Christian König <[email protected]>.
Signed-off-by Rajneesh Bhardwaj <[email protected]>
---
Changes in v2:
- Updated commit message as per Christian's feedback
drivers/gpu/drm/ttm/ttm_bo.c | 1 + 1 file changed, 1 insertion(+)
drivers/gpu/drm/ttm/ttm_bo.c +1 -0
@@ -347,6 +347,7 @@ static void ttm_bo_release(struct kref *kref)if (!dma_resv_test_signaled (bo->base.resv,DMA_RESV_USAGE_BOOKKEEP ) || + (want_init_on_free () && (bo->ttm !=NULL )) || !dma_resv_trylock (bo->base.resv)) {/* The BO is not idle, resurrect it for delayed destroy */ ttm_bo_flush_all_fences (bo);
Signature · 1 line
2.17.1