Message ID | 20230630001214.1965121-1-radhakrishna.sripada@intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [RFC] drm/i915/shrinker: Treat fb's with higher priority than active reference | expand |
diff --git a/drivers/gpu/drm/i915/gem/i915_gem_shrinker.c b/drivers/gpu/drm/i915/gem/i915_gem_shrinker.c index 214763942aa2..a2371ac718d9 100644 --- a/drivers/gpu/drm/i915/gem/i915_gem_shrinker.c +++ b/drivers/gpu/drm/i915/gem/i915_gem_shrinker.c @@ -198,8 +198,7 @@ i915_gem_shrink(struct i915_gem_ww_ctx *ww, !is_vmalloc_addr(obj->mm.mapping)) continue; - if (!(shrink & I915_SHRINK_ACTIVE) && - i915_gem_object_is_framebuffer(obj)) + if (i915_gem_object_is_framebuffer(obj)) continue; if (!can_release_pages(obj))
Earlier framebuffers were treated as an active reference in the shrinker code and were skipped from eviction during kswapd run. However when the memory pressure is high, the fb object would be evicted. This causes display flicker while running memory stress tests when fb objects are created from smem. To eliminate display artifacts during memory stress tests, when bo's are created from smem, skip evicting framebuffers all the time. Cc: Charlton Lin <charlton.lin@intel.com> Cc: Fei Yang <fei.yang@intel.com> Cc: Alan Previn <alan.previn.teres.alexis@intel.com> Cc: Sachin Kumar <sachin.kumar@intel.com> Suggested-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Radhakrishna Sripada <radhakrishna.sripada@intel.com> --- drivers/gpu/drm/i915/gem/i915_gem_shrinker.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)