Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Radhakrishna Sripada <radhakrishna.sripada@intel.com>
To: intel-gfx@lists.freedesktop.org
Subject: [Intel-gfx] [RFC] drm/i915/shrinker: Treat fb's with higher priority than active reference
Date: Thu, 29 Jun 2023 17:12:14 -0700	[thread overview]
Message-ID: <20230630001214.1965121-1-radhakrishna.sripada@intel.com> (raw)

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(-)

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


             reply	other threads:[~2023-06-30  0:13 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-30  0:12 Radhakrishna Sripada [this message]
2023-06-30  1:12 ` [Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915/shrinker: Treat fb's with higher priority than active reference Patchwork
2023-06-30  7:46 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230630001214.1965121-1-radhakrishna.sripada@intel.com \
    --to=radhakrishna.sripada@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox