Graceful page fault handling for Vega/Navi

Kuehling, Felix Felix.Kuehling at amd.com
Wed Sep 4 23:28:36 UTC 2019


On 2019-09-04 7:03 p.m., Huang, Ray wrote:
> On Wed, Sep 04, 2019 at 05:02:21PM +0200, Christian König wrote:
>> Hi everyone,
>>
>> this series is the next puzzle piece for recoverable page fault handling on Vega and Navi.
>>
>> It adds a new direct scheduler entity for VM updates which is then used to update page tables during a fault.
>>
>> In other words previously an application doing an invalid memory access would just hang and/or repeat the invalid access over and over again. Now the handling is modified so that the invalid memory access is redirected to the dummy page.
>>
>> This needs the following prerequisites:
>> a) The firmware must be new enough so allow re-routing of page faults.
>> b) Fault retry must be enabled using the amdgpu.noretry=0 parameter.
> In my side, I found "notretry" parameter not workable for vmid 0 vm faults.
> If the same observation in your side, I'd like give a check.

I think the noretry parameter is not meant to affect VMID0. I just find 
it surprising that retry faults are happening at all on VMID0. It 
doesn't make a lot of sense. I can't think of any good reason to retry 
any page faults in VMID0.

I see that the HW default for the RETRY_PERMISSION_OR_INVALID_PAGE_FAULT 
bit is 1 in VM_CONTEXT0_CNTL. I don't see us changing that value in the 
driver. We probably should. I'll send out a patch for that.

Regards,
   Felix


>
> Thanks,
> Ray
>
>
>> c) Enough free VRAM to allocate page tables to point to the dummy page.
>>
>> The re-routing of page faults current only works on Vega10, so Vega20 and Navi will still need some more time.
>>
>> Please review and/or comment,
>> Christian.
>>
>>
>> _______________________________________________
>> amd-gfx mailing list
>> amd-gfx at lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
> _______________________________________________
> amd-gfx mailing list
> amd-gfx at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx


More information about the amd-gfx mailing list