Commit 0a281f5a authored by Andres Rodriguez's avatar Andres Rodriguez Committed by Alex Deucher

drm/amdgpu: new queue policy, take first 2 queues of each pipe v2

Instead of taking the first pipe and giving the rest to kfd, take the
first 2 queues of each pipe.

Effectively, amdgpu and amdkfd own the same number of queues. But
because the queues are spread over multiple pipes the hardware will be
able to better handle concurrent compute workloads.

amdgpu goes from 1 pipe to 4 pipes, i.e. from 1 compute threads to 4
amdkfd goes from 3 pipe to 4 pipes, i.e. from 3 compute threads to 4

v2: fix policy comment
Reviewed-by: default avatarEdward O'Callaghan <funfunctor@folklore1984.net>
Reviewed-by: default avatarFelix Kuehling <Felix.Kuehling@amd.com>
Acked-by: default avatarChristian König <christian.koenig@amd.com>
Signed-off-by: default avatarAndres Rodriguez <andresx7@gmail.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 7b2124a5
...@@ -2838,8 +2838,8 @@ static void gfx_v7_0_compute_queue_acquire(struct amdgpu_device *adev) ...@@ -2838,8 +2838,8 @@ static void gfx_v7_0_compute_queue_acquire(struct amdgpu_device *adev)
if (mec >= adev->gfx.mec.num_mec) if (mec >= adev->gfx.mec.num_mec)
break; break;
/* policy: amdgpu owns all queues in the first pipe */ /* policy: amdgpu owns the first two queues of the first MEC */
if (mec == 0 && pipe == 0) if (mec == 0 && queue < 2)
set_bit(i, adev->gfx.mec.queue_bitmap); set_bit(i, adev->gfx.mec.queue_bitmap);
} }
......
...@@ -1464,8 +1464,8 @@ static void gfx_v8_0_compute_queue_acquire(struct amdgpu_device *adev) ...@@ -1464,8 +1464,8 @@ static void gfx_v8_0_compute_queue_acquire(struct amdgpu_device *adev)
if (mec >= adev->gfx.mec.num_mec) if (mec >= adev->gfx.mec.num_mec)
break; break;
/* policy: amdgpu owns all queues in the first pipe */ /* policy: amdgpu owns the first two queues of the first MEC */
if (mec == 0 && pipe == 0) if (mec == 0 && queue < 2)
set_bit(i, adev->gfx.mec.queue_bitmap); set_bit(i, adev->gfx.mec.queue_bitmap);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment