Re: [PATCH v2] drm/i915: Reorder context-close to avoid calling i915_vma_close() under RCU

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Quoting Tvrtko Ursulin (2017-11-09 10:00:27)
> 
> On 09/11/2017 09:32, Tvrtko Ursulin wrote:
> > 
> > On 09/11/2017 08:55, Chris Wilson wrote:
> >> 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.
> 
> Would it be worth adding might_sleep to i915_vma_close? Or at a lower layer?

vm_free_page() would be my first choice. i915_vma_close() is also a good
candidate, but I'm worrying if that's too disconnected with the reason
why it might_sleep(). Most of the work within (unbind if not active)
could be atomic as it is just poking at our pagetables. It's just that
changing the PAT is not lazy and uses a stop_machine to change the view
on all CPUs at once. For our purposes we could do with an arch/x86 WC
allocator. Fortunately (or unfortunately depending on pov) we don't need
them in enough bulk to justify pursuing a global scheme, though if one
turned up we would happily make use of it.
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux