]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915/gtt: Pin vma during virtual address allocation
authorMika Kuoppala <mika.kuoppala@linux.intel.com>
Thu, 25 Jun 2015 15:35:15 +0000 (18:35 +0300)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Fri, 26 Jun 2015 09:04:34 +0000 (11:04 +0200)
commit0ff87715f5204ff01f2650c4ad760eee8dd79cba
tree60966f4da087c3e3e197e5f894362111a4ecc0ef
parent75e3495716e9658095d37da0043c9172829c3310
drm/i915/gtt: Pin vma during virtual address allocation

Dynamic page table allocation might wake the shrinker
when memory is requested for page table structures.
As this happens when we try to allocate the virtual address
during binding, our vma might be among the targets for eviction.
We should do i915_vma_pin() and do pin early in there like Chris
suggests but this is interim solution.

Shield our vma from shrinker by incrementing pin count before
the virtual address is allocated.

The proper place to fix this would be in gem, inside of
i915_vma_pin(). But we don't have that yet so take the short
cut as a intermediate solution.

Testcase: igt/gem_ctx_thrash
Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
Reviewed-by: Michel Thierry <michel.thierry@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/i915_gem_gtt.c