[PATCH v2 08/12] drm/amdgpu: use doorbell manager for kfd kernel doorbells
Felix Kuehling
felix.kuehling at amd.com
Fri Jun 9 19:33:16 UTC 2023
On 2023-04-25 15:59, Shashank Sharma wrote:
>
> On 24/04/2023 21:56, Felix Kuehling wrote:
>> On 2023-04-22 2:39, Shashank Sharma wrote:
>>> - KFD process level doorbells: doorbell pages which are allocated by
>>> kernel but mapped and written by userspace processes, saved in
>>> struct pdd->qpd->doorbells
>>>
>>> size = kfd_doorbell_process_slice.
>>>
>>> We realized that we only need 1-2 doorbells for KFD kernel level
>>> stuff (so kept it one page), but need 2-page of doorbells for KFD
>>> process, so they are sized accordingly.
>>>
>>> We have also run kfd_test_suit and verified the changes for any
>>> regression. Hope this helps in explaining the design.
>>
>> Right, I missed that this was only for kernel doorbells. I wonder
>> whether KFD really needs its own page here. I think we only need a
>> doorbell for HWS. And when we use MES, I think even that isn't needed
>> because MES packet submissions go through amdgpu. So maybe KFD
>> doesn't need its own kernel-mode doorbell page any more on systems
>> with user graphics mode queues.
>
> Yeah, for any IP with MES enabled, KFD doesn't need kernel level
> doorbells. But I still allocated a page just to make sure we do not
> break any non-MES platforms or use cases where MES is deliberately
> disabled from kernel command line. Hope that works for you.
Even without MES, we still only need one doorbell for HWS. Allocating a
whole page for that is wasteful. Anyway, I'm OK with cleaning that up later.
Regards,
Felix
>
> - Shashank
>
>>
>> Regards,
>> Felix
>>
>>
>>>
>>> - Shashank
More information about the amd-gfx
mailing list