Re: [PATCH 0/3] KFD upstreaming

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2019-06-04 16:15, Alex Deucher wrote:
> On Tue, Jun 4, 2019 at 4:12 PM Kuehling, Felix <Felix.Kuehling@xxxxxxx> wrote:
>> There haven't been any objections to these changes. Does anyone want to
>> add their Acked-by before I submit?
> Series is:
> Acked-by: Alex Deucher <alexander.deucher@xxxxxxx>
>
> I wonder if there is a chance to share any code down the road with the
> context priority stuff in amdgpu.

KFD sets queue and pipe priorities in MQDs. The register access has to 
be done by HWS or MEC firmware because it maps our queues dynamically. 
The priorities in the KFD API map 1:1 to queue priorities (16 levels) 
but need some translation for pipe priorities (3 levels).

AMDGPU sets the queue and pipe priorities directly to registers rather 
than updating the MQD and remapping the queue using KIQ. And seems to 
have only a binary choice between high and low priority. It also does 
some per-pipe resource reservation that we don't have an equivalent for 
in KFD.

Just looking at the code now, the compute pipe priority handling in 
amdgpu seems wrong. The pipe priority is per pipe. AIUI it gets applied 
to the pipe when the CP switches the active queue. Programming this 
register from the driver is probably pointless. You should set this in 
the MQD. But changing the MQD of a mapped queue is not a good idea in my 
experience. So you'd have to unmap the queue, update the priorities and 
then remap it (using KIQ).

I don't see a lot of potential for code sharing on current hardware 
because we have such different ways of scheduling queues. If you change 
amdgpu to use MQDs and KIQ to update priorities, we could maybe share 
the code that initializes and updates MQDs.

Regards,
   Felix

>
> Alex
>
>> Thanks,
>>     Felix
>>
>> On 2019-05-28 18:38, Kuehling, Felix wrote:
>>> New feature: queue priorities
>>>
>>> The eviction state logic change is preparation for some debugger support
>>> we're working on but haven't settled on the final ABI yet.
>>>
>>> Felix Kuehling (1):
>>>     drm/amdkfd: Simplify eviction state logic
>>>
>>> Jay Cornwall (1):
>>>     drm/amdkfd: Implement queue priority controls for gfx9
>>>
>>> ozeng (1):
>>>     drm/amdkfd: CP queue priority controls
>>>
>>>    .../drm/amd/amdkfd/kfd_device_queue_manager.c | 84 ++++++++++---------
>>>    drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager.c  | 20 +++++
>>>    drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager.h  |  2 +-
>>>    .../gpu/drm/amd/amdkfd/kfd_mqd_manager_cik.c  | 27 +++---
>>>    .../gpu/drm/amd/amdkfd/kfd_mqd_manager_v9.c   | 20 ++---
>>>    .../gpu/drm/amd/amdkfd/kfd_mqd_manager_vi.c   | 22 ++---
>>>    drivers/gpu/drm/amd/amdkfd/kfd_priv.h         | 16 ++++
>>>    7 files changed, 113 insertions(+), 78 deletions(-)
>>>
>> _______________________________________________
>> amd-gfx mailing list
>> amd-gfx@xxxxxxxxxxxxxxxxxxxxx
>> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
amd-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/amd-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux