[Intel-gfx] looks like a issue in do_switch() and mi_set_context() in i915_gem_context.c?
Chris Wilson
chris at chris-wilson.co.uk
Thu Apr 2 00:17:52 PDT 2015
On Wed, Apr 01, 2015 at 08:01:56PM +0800, Zhi Wang wrote:
> Hi Chris:
> Thanks for the reply. :) I can understand that the backing
> storage is pinned at this time, as the reference counter of context
> object should not be zero. But for VMA, is there any chance that the
> vma will be unbinded from GGTT at this time by shrinker? I saw that
> i915_gem_object_ggtt_unpin() will decrease the VMA reference
> counter...
In order for the shrinker to evict an active object, it must first wait
upon it. (So the shrinker will only do so as a last gasp measure.) Once
the vma is unbound, we know that the GPU will have switched contexts
away from the vma (because the last request that we waited upon for the
vma included the instructions to do the switch away) and so the pages are
swappable.
This obviously relies on the hardware being correct... As would waiting
upon the CCID!
-Chris
--
Chris Wilson, Intel Open Source Technology Centre
More information about the Intel-gfx
mailing list