lkml.org 
[lkml]   [2014]   [Jul]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subjecti915: reduce noise from i915_gem_shrinker_oom when no memory freed.
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)

\
 
 \ /
  Last update: 2014-07-11 05:41    [W:0.629 / U:0.012 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site