[Intel-gfx] [PATCH] drm/i915: Handle concurrent GTT faults gracefully
Chris Wilson
chris at chris-wilson.co.uk
Thu Jun 12 16:32:08 CEST 2014
On Thu, Jun 12, 2014 at 03:13:14PM +0100, Chris Wilson wrote:
> remap_pfn_range() has a nasty surprise if you try to handle two faults
> from the same vma concurrently: that is the second thread hits a BUG()
> to assert that the range is clear. As we hold our struct_mutex whilst
> manipulating the GTT, we have an opportunity to check ahead of time
> whether a second thread already processed the pagefault for us. We also
> have to take care of cleaning up the VMA should remap_pfn_range()
> encounter an error (likely ENOMEM) partway through processing the PTE.
>
> Fixes potential BUG from
>
> commit c5158fabeaf53ed2c614c3333aaa4b3cce80f500
> Author: Chris Wilson <chris at chris-wilson.co.uk>
> Date: Tue Jun 10 12:14:41 2014 +0100
>
> Testcase: igt/gem_mmap_gtt/wip
Testcase: igt/gem_mmap_gtt/fault_concurrent
-Chris
--
Chris Wilson, Intel Open Source Technology Centre
More information about the Intel-gfx
mailing list