[igt-dev] [RFC] tests/i915/gem_exec_fence: Pre-fault objects with dependencies

Chris Wilson chris at chris-wilson.co.uk
Fri Mar 15 00:07:35 UTC 2019


Quoting Daniele Ceraolo Spurio (2019-03-14 23:56:29)
> 
> 
> On 3/14/19 4:29 PM, Chris Wilson wrote:
> > Quoting Antonio Argenziano (2019-03-14 23:22:32)
> >> In the fault manager code we wait on an active object to complete before
> >> servicing the fault. This meant that the object 'out' used in the test
> >> could not be read until it became inactive which could not happen since
> >> it is kept busy from the store queued behind the spinner (at least). The
> >> bug became evident only after using the mmap_offset patches since we
> >> were not faulting before.
> > 
> > out is using mmap_wc, it doesn't block inside the fault handler today.
> > And it better had not start blocking in the future. Now for the opposite
> > problem of removing the gratuitous blocking in the gtt fault handler,
> > which may require some reminders to userspace that they needed to
> > control sync themselves.
> > -Chris
> > 
> 
> The current patches for mmap_offset do wait on all types of mapping, so 
> I guess we need to change that.
> 
> @Matt: I saw that there were lots of comments on that series so this 
> issue might have already been pointed out, but if it hasn't please add 
> it to the list ;)

In the fault handlers, ideally we should only wait for the pages (+PTE)
to become available, but not for prior GPU operations. The current
set_to_gtt_domain is meant to only cover flushing the pages from swap,
not the GPU writes (in the future that may have a lot more fun
differentiating between unwanted user fences and mandatory kernel
fences) -- however, since we have a big hammer there now, undoubtably
(and I know I'm guilty in a few cases) userspace is using the initial
pagefault as a sync.
-Chris


More information about the igt-dev mailing list