• Mika Kuoppala's avatar
    drm/i915/gtt: Pin vma during virtual address allocation · b2dd4511
    Mika Kuoppala authored
    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: default avatarMika Kuoppala <mika.kuoppala@intel.com>
    Reviewed-by: default avatarMichel Thierry <michel.thierry@intel.com>
    Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
    b2dd4511
i915_gem_gtt.c 75.8 KB