[Intel-gfx] [RFC] drm/i915/shrinker: Treat fb's with higher priority than active reference
Radhakrishna Sripada
radhakrishna.sripada at intel.com
Fri Jun 30 00:12:14 UTC 2023
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 at intel.com>
Cc: Fei Yang <fei.yang at intel.com>
Cc: Alan Previn <alan.previn.teres.alexis at intel.com>
Cc: Sachin Kumar <sachin.kumar at intel.com>
Suggested-by: Ville Syrjälä <ville.syrjala at linux.intel.com>
Signed-off-by: Radhakrishna Sripada <radhakrishna.sripada at intel.com>
---
drivers/gpu/drm/i915/gem/i915_gem_shrinker.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
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))
--
2.34.1
More information about the Intel-gfx
mailing list