i915: reduce noise from i915_gem_shrinker_oom when no memory freed.
Subsystems (2)
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.
drivers/gpu/drm/i915/i915_gem.c +3 -0
@@ -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)
Quoted 5 lines · Dave Jones
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.
We still want to know when we failed to free anything though.
if (freed || unbound || bound)
pr_info("Purging GPU memory...
should be a reasonable compromise.
-Chris
Signature · 1 line
Chris Wilson, Intel Open Source Technology Centre
Quoted 7 lines · Chris Wilson
Quoted 5 lines · Dave Jones
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.
Quoted 6 lines
We still want to know when we failed to free anything though.
if (freed || unbound || bound)
pr_info("Purging GPU memory...should be a reasonable compromise.
Dave, would this work for you? Can you please submit it as a patch to intel-gfx?
Thanks, Daniel
Signature · 3 lines
Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch
Quoted 10 lines · Daniel Vetter
Quoted 9 lines · Chris Wilson
Quoted 5 lines · Dave Jones
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.
We still want to know when we failed to free anything though.
Quoted 7 lines
Quoted 4 lines
if (freed || unbound || bound)
pr_info("Purging GPU memory...should be a reasonable compromise.
Dave, would this work for you? Can you please submit it as a patch to intel-gfx?
Will do when I get back on Monday. I'm running my tests over the weekend, looks ok so far.
thanks,
Dave