]> git.baikalelectronics.ru Git - kernel.git/commit
drm/amdgpu: Optimize mutex usage (v4)
authorAlex Xie <AlexBin.Xie@amd.com>
Fri, 16 Jun 2017 13:07:29 +0000 (09:07 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 19 Jun 2017 21:31:22 +0000 (17:31 -0400)
commitbf27d85177418db891f5008df92e49950421b296
tree8ed09ff14dd34aa048296aa3a32e92e749e12d34
parent4aa592a897aa714a45f9d7b021bf12663d912a86
drm/amdgpu: Optimize mutex usage (v4)

In original function amdgpu_bo_list_get, the waiting
for result->lock can be quite long while mutex
bo_list_lock was holding. It can make other tasks
waiting for bo_list_lock for long period.

Secondly, this patch allows several tasks(readers of idr)
to proceed at the same time.

v2: use rcu and kref (Dave Airlie and Christian König)
v3: update v1 commit message (Michel Dänzer)
v4: rebase on upstream (Alex Deucher)

Signed-off-by: Alex Xie <AlexBin.Xie@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu.h
drivers/gpu/drm/amd/amdgpu/amdgpu_bo_list.c