drm/ttm: optimize the pool shrinker a bit v2
authorChristian König <christian.koenig@amd.com>
Thu, 1 Apr 2021 13:45:33 +0000 (15:45 +0200)
committerChristian König <christian.koenig@amd.com>
Fri, 27 Aug 2021 07:55:39 +0000 (09:55 +0200)
commit450b2622bc11037c8108f7d2f2d8a43e980e847d
treecfb2c7a61e4d624967867ffa325d6755f8a44438
parent880121be1179a0db3eb4fdb198108d9475b8be4c
drm/ttm: optimize the pool shrinker a bit v2

Switch back to using a spinlock again by moving the IOMMU unmap outside
of the locked region.

This avoids contention especially while freeing pages.

v2: Add a comment explaining why we need sync_shrinkers().

Signed-off-by: Christian König <christian.koenig@amd.com>
Acked-by: Huang Rui <ray.huang@amd.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20210820120528.81114-3-christian.koenig@amd.com
drivers/gpu/drm/ttm/ttm_pool.c