[Intel-gfx] [PATCH] drm/i915: Reorder context-close to avoid calling i915_vma_close() under RCU
Chris Wilson
chris at chris-wilson.co.uk
Thu Nov 9 08:50:58 UTC 2017
Quoting Chris Wilson (2017-11-09 08:20:48)
> When we close the VMA, we unbind it from the ppgtt and tear down the
> page directory pointing at it. That may trigger us to return WC pages
> back to the system, requiring conversion back to WB which itself may
> sleep. That makes i915_vma_close() unsuitable for use inside the RCU
> read lock, which we need to hold to iterate the radixtree.
>
> The fix is quite simple, we can close all the VMA as we close the ppgtt,
> we only need to do that instead of closing them during destruction of
> the LUT.
The flaw is that i915_vma_close() frees the vma; destroying our
backpointer from the lut to the object. Definitely time for tea. :(
-Chris
More information about the Intel-gfx
mailing list