[PATCH v5] drm/amdgpu: handle IH ring1 overflow

Christian König ckoenig.leichtzumerken at gmail.com
Thu Nov 25 07:08:08 UTC 2021


Am 24.11.21 um 23:52 schrieb philip yang:
>
>
> On 2021-11-24 10:33 a.m., Christian König wrote:
>>
>>
>> Am 24.11.21 um 16:23 schrieb philip yang:
>>> [SNIP]
>>>>>   +/**
>>>>> + * amdgpu_ih_process1 - interrupt handler work for IH ring1
>>>>> + *
>>>>> + * @adev: amdgpu_device pointer
>>>>> + * @ih: ih ring to process
>>>>> + *
>>>>> + * Interrupt handler of IH ring1, walk the IH ring1.
>>>>> + * Returns irq process return code.
>>>>> + */
>>>>> +int amdgpu_ih_process1(struct amdgpu_device *adev, struct 
>>>>> amdgpu_ih_ring *ih)
>>>>
>>>> I don't think we need this new function any more.
>>>>
>>>> The check if the timestamp goes backwards can now be done inside 
>>>> the page fault handler.
>>> Do you mean to merge this into the original ring0 interrupt handler? 
>>> Then we need add parameter (ih->overflow_enabled) and process two 
>>> different cases in ring0 interrupt handler, I think that is not good 
>>> to maintain later so I want to separate them.
>>
>> What I mean is you don't need any different handling any more if we 
>> use the timestamp anyway.
>>
>> Just keep the last processed timestamp in the page fault code and 
>> ignore faults when it starts to go backwards.
>>
>> If IVs should be dropped or processed as much as possible is 
>> depending on quite a bunch of things and should probably not be 
>> handled in the IH code in general.
>
> Use ih->processed_timestamp updated in decode_iv, for both checkpoint 
> process and page fault handler to drop stale fault.
>
> interrupt handler don't need change.
>

Well that's what I wanted to say: I would rather change the interrupt 
handler for page faults than the general interrupt processing.

That we should drop older faults is page fault handling specific and 
should not affect other handlers.

Regards,
Christian.

> Thanks,
>
> Philip
>
>>
>> Regards,
>> Christian.



More information about the amd-gfx mailing list