linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dave Jones <davej@redhat.com>
To: Linux Kernel <linux-kernel@vger.kernel.org>
Cc: chris@chris-wilson.co.uk, daniel.vetter@ffwll.ch
Subject: i915: reduce noise from i915_gem_shrinker_oom when no memory freed.
Date: Thu, 10 Jul 2014 23:05:05 -0400	[thread overview]
Message-ID: <20140711030505.GA30830@redhat.com> (raw)

When the shrinker doesn't free any memory, don't spew over and over
into the logs.  My fuzz tester hits this quite easily, resulting
in dozens of instances of this printk when memory runs low, filling
dmesg, when there's not even any graphical stuff going on, so the
situation would never change.

Signed-off-by: Dave Jones <davej@redhat.com>

diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index f36126383d26..9cbccdfedd74 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -5198,6 +5198,9 @@ i915_gem_shrinker_oom(struct notifier_block *nb, unsigned long event, void *ptr)
 	if (unlock)
 		mutex_unlock(&dev->struct_mutex);
 
+	if (freed == 0)
+		return NOTIFY_DONE;
+
 	pr_info("Purging GPU memory, %lu bytes freed, %lu bytes still pinned.\n",
 		freed, pinned);
 	if (unbound || bound)

             reply	other threads:[~2014-07-11  3:05 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-11  3:05 Dave Jones [this message]
2014-07-11  6:11 ` i915: reduce noise from i915_gem_shrinker_oom when no memory freed Chris Wilson
2014-07-12  9:23   ` Daniel Vetter
2014-07-12 15:50     ` Dave Jones

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=20140711030505.GA30830@redhat.com \
    --to=davej@redhat.com \
    --cc=chris@chris-wilson.co.uk \
    --cc=daniel.vetter@ffwll.ch \
    --cc=linux-kernel@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).