* i915: reduce noise from i915_gem_shrinker_oom when no memory freed.
@ 2014-07-11 3:05 Dave Jones
2014-07-11 6:11 ` Chris Wilson
0 siblings, 1 reply; 4+ messages in thread
From: Dave Jones @ 2014-07-11 3:05 UTC (permalink / raw)
To: Linux Kernel; +Cc: chris, daniel.vetter
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)
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: i915: reduce noise from i915_gem_shrinker_oom when no memory freed.
2014-07-11 3:05 i915: reduce noise from i915_gem_shrinker_oom when no memory freed Dave Jones
@ 2014-07-11 6:11 ` Chris Wilson
2014-07-12 9:23 ` Daniel Vetter
0 siblings, 1 reply; 4+ messages in thread
From: Chris Wilson @ 2014-07-11 6:11 UTC (permalink / raw)
To: Dave Jones, Linux Kernel, daniel.vetter
On Thu, Jul 10, 2014 at 11:05:05PM -0400, Dave Jones wrote:
> 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
--
Chris Wilson, Intel Open Source Technology Centre
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: i915: reduce noise from i915_gem_shrinker_oom when no memory freed.
2014-07-11 6:11 ` Chris Wilson
@ 2014-07-12 9:23 ` Daniel Vetter
2014-07-12 15:50 ` Dave Jones
0 siblings, 1 reply; 4+ messages in thread
From: Daniel Vetter @ 2014-07-12 9:23 UTC (permalink / raw)
To: Chris Wilson; +Cc: Dave Jones, Linux Kernel, daniel.vetter
On Fri, Jul 11, 2014 at 07:11:43AM +0100, Chris Wilson wrote:
> On Thu, Jul 10, 2014 at 11:05:05PM -0400, Dave Jones wrote:
> > 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.
Dave, would this work for you? Can you please submit it as a patch to
intel-gfx?
Thanks, Daniel
--
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: i915: reduce noise from i915_gem_shrinker_oom when no memory freed.
2014-07-12 9:23 ` Daniel Vetter
@ 2014-07-12 15:50 ` Dave Jones
0 siblings, 0 replies; 4+ messages in thread
From: Dave Jones @ 2014-07-12 15:50 UTC (permalink / raw)
To: Chris Wilson, Linux Kernel
On Sat, Jul 12, 2014 at 11:23:43AM +0200, Daniel Vetter wrote:
> On Fri, Jul 11, 2014 at 07:11:43AM +0100, Chris Wilson wrote:
> > On Thu, Jul 10, 2014 at 11:05:05PM -0400, Dave Jones wrote:
> > > 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.
>
> 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
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-07-12 15:50 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-11 3:05 i915: reduce noise from i915_gem_shrinker_oom when no memory freed Dave Jones
2014-07-11 6:11 ` Chris Wilson
2014-07-12 9:23 ` Daniel Vetter
2014-07-12 15:50 ` Dave Jones
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).