[Intel-gfx] [PATCH v6 63/64] drm/i915: Move gt_revoke() slightly

Maarten Lankhorst maarten.lankhorst at linux.intel.com
Mon Jan 18 12:01:10 UTC 2021


Op 18-01-2021 om 12:11 schreef Thomas Hellström:
>
> On 1/5/21 4:35 PM, Maarten Lankhorst wrote:
>> We get a lockdep splat when the reset mutex is held, because it can be
>> taken from fence_wait. This conflicts with the mmu notifier we have,
>> because we recurse between reset mutex and mmap lock -> mmu notifier.
>>
>> Remove this recursion by calling revoke_mmaps before taking the lock.
>
> Hmm. Is the mmap se taken from gt_revoke()?
>
> If so, isn't the real problem that the mmap_sem is taken in the dma_fence critical path (where the reset code sits)? 

Hey,

The gpu reset code specifically needs to revoke all gtt mappings, and the fault handler uses intel_gt_reset_trylock(),

so this change should be ok since all those mappings are invalidated correctly and completed before this point.

The reset mutex isn't actually taken inside fence code, but used for lockdep validation, so this should be ok.

~Maarten



More information about the Intel-gfx mailing list