diff mbox series

drm: shrinker: Add a prefix on purging logs

Message ID 20191214162049.10997-1-ezequiel@collabora.com (mailing list archive)
State New, archived
Headers show
Series drm: shrinker: Add a prefix on purging logs | expand

Commit Message

Ezequiel Garcia Dec. 14, 2019, 4:20 p.m. UTC
It's not entirely obvious why these messages have
"info" severity. In any case, add a proper driver prefix
to give the user a bit of context of where they are coming from.

Signed-off-by: Ezequiel Garcia <ezequiel@collabora.com>
---
 drivers/gpu/drm/i915/gem/i915_gem_shrinker.c     | 2 ++
 drivers/gpu/drm/msm/msm_gem_shrinker.c           | 2 ++
 drivers/gpu/drm/panfrost/panfrost_gem_shrinker.c | 2 ++
 3 files changed, 6 insertions(+)

Comments

Ezequiel Garcia Jan. 20, 2020, 5:56 p.m. UTC | #1
On Sat, 2019-12-14 at 13:20 -0300, Ezequiel Garcia wrote:
> It's not entirely obvious why these messages have
> "info" severity. In any case, add a proper driver prefix
> to give the user a bit of context of where they are coming from.
> 
> Signed-off-by: Ezequiel Garcia <ezequiel@collabora.com>

Gentle ping.

Thanks,
Ezequiel

> ---
>  drivers/gpu/drm/i915/gem/i915_gem_shrinker.c     | 2 ++
>  drivers/gpu/drm/msm/msm_gem_shrinker.c           | 2 ++
>  drivers/gpu/drm/panfrost/panfrost_gem_shrinker.c | 2 ++
>  3 files changed, 6 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/gem/i915_gem_shrinker.c b/drivers/gpu/drm/i915/gem/i915_gem_shrinker.c
> index 3a926a8755c6..cd0372a1d936 100644
> --- a/drivers/gpu/drm/i915/gem/i915_gem_shrinker.c
> +++ b/drivers/gpu/drm/i915/gem/i915_gem_shrinker.c
> @@ -4,6 +4,8 @@
>   * Copyright © 2008-2015 Intel Corporation
>   */
>  
> +#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
> +
>  #include <linux/oom.h>
>  #include <linux/sched/mm.h>
>  #include <linux/shmem_fs.h>
> diff --git a/drivers/gpu/drm/msm/msm_gem_shrinker.c b/drivers/gpu/drm/msm/msm_gem_shrinker.c
> index 722d61668a97..0620d441a2cc 100644
> --- a/drivers/gpu/drm/msm/msm_gem_shrinker.c
> +++ b/drivers/gpu/drm/msm/msm_gem_shrinker.c
> @@ -4,6 +4,8 @@
>   * Author: Rob Clark <robdclark@gmail.com>
>   */
>  
> +#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
> +
>  #include "msm_drv.h"
>  #include "msm_gem.h"
>  
> diff --git a/drivers/gpu/drm/panfrost/panfrost_gem_shrinker.c b/drivers/gpu/drm/panfrost/panfrost_gem_shrinker.c
> index 458f0fa68111..b9d0e821c3f6 100644
> --- a/drivers/gpu/drm/panfrost/panfrost_gem_shrinker.c
> +++ b/drivers/gpu/drm/panfrost/panfrost_gem_shrinker.c
> @@ -6,6 +6,8 @@
>   * Author: Rob Clark <robdclark@gmail.com>
>   */
>  
> +#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
> +
>  #include <linux/list.h>
>  
>  #include <drm/drm_device.h>
Daniel Vetter Jan. 22, 2020, 8:04 a.m. UTC | #2
On Sat, Dec 14, 2019 at 01:20:49PM -0300, Ezequiel Garcia wrote:
> It's not entirely obvious why these messages have
> "info" severity. In any case, add a proper driver prefix
> to give the user a bit of context of where they are coming from.

So the i915 one makes some sense, it's for oom. Which shouldn't happen
often. Then panfrost/msm ones are imo dubious and should be changed to one
of the drm debug ones. Looks like copypasta fail, we might want to change
all of them to drm debugging ones (well maybe keep the i915 one as a drm
info output).
-Daniel

> 
> Signed-off-by: Ezequiel Garcia <ezequiel@collabora.com>
> ---
>  drivers/gpu/drm/i915/gem/i915_gem_shrinker.c     | 2 ++
>  drivers/gpu/drm/msm/msm_gem_shrinker.c           | 2 ++
>  drivers/gpu/drm/panfrost/panfrost_gem_shrinker.c | 2 ++
>  3 files changed, 6 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/gem/i915_gem_shrinker.c b/drivers/gpu/drm/i915/gem/i915_gem_shrinker.c
> index 3a926a8755c6..cd0372a1d936 100644
> --- a/drivers/gpu/drm/i915/gem/i915_gem_shrinker.c
> +++ b/drivers/gpu/drm/i915/gem/i915_gem_shrinker.c
> @@ -4,6 +4,8 @@
>   * Copyright © 2008-2015 Intel Corporation
>   */
>  
> +#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
> +
>  #include <linux/oom.h>
>  #include <linux/sched/mm.h>
>  #include <linux/shmem_fs.h>
> diff --git a/drivers/gpu/drm/msm/msm_gem_shrinker.c b/drivers/gpu/drm/msm/msm_gem_shrinker.c
> index 722d61668a97..0620d441a2cc 100644
> --- a/drivers/gpu/drm/msm/msm_gem_shrinker.c
> +++ b/drivers/gpu/drm/msm/msm_gem_shrinker.c
> @@ -4,6 +4,8 @@
>   * Author: Rob Clark <robdclark@gmail.com>
>   */
>  
> +#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
> +
>  #include "msm_drv.h"
>  #include "msm_gem.h"
>  
> diff --git a/drivers/gpu/drm/panfrost/panfrost_gem_shrinker.c b/drivers/gpu/drm/panfrost/panfrost_gem_shrinker.c
> index 458f0fa68111..b9d0e821c3f6 100644
> --- a/drivers/gpu/drm/panfrost/panfrost_gem_shrinker.c
> +++ b/drivers/gpu/drm/panfrost/panfrost_gem_shrinker.c
> @@ -6,6 +6,8 @@
>   * Author: Rob Clark <robdclark@gmail.com>
>   */
>  
> +#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
> +
>  #include <linux/list.h>
>  
>  #include <drm/drm_device.h>
> -- 
> 2.22.0
>
Ezequiel Garcia Jan. 28, 2020, 7:58 p.m. UTC | #3
On Wed, 2020-01-22 at 09:04 +0100, Daniel Vetter wrote:
> On Sat, Dec 14, 2019 at 01:20:49PM -0300, Ezequiel Garcia wrote:
> > It's not entirely obvious why these messages have
> > "info" severity. In any case, add a proper driver prefix
> > to give the user a bit of context of where they are coming from.
> 
> So the i915 one makes some sense, it's for oom. Which shouldn't happen
> often. Then panfrost/msm ones are imo dubious and should be changed to one
> of the drm debug ones. Looks like copypasta fail, we might want to change
> all of them to drm debugging ones (well maybe keep the i915 one as a drm
> info output).

Sounds good. I can submit follow up patches for that.
Meanwhile, this patch seems good to go, right?

Thanks,
Ezequiel

> -Daniel
> 
> > Signed-off-by: Ezequiel Garcia <ezequiel@collabora.com>
> > ---
> >  drivers/gpu/drm/i915/gem/i915_gem_shrinker.c     | 2 ++
> >  drivers/gpu/drm/msm/msm_gem_shrinker.c           | 2 ++
> >  drivers/gpu/drm/panfrost/panfrost_gem_shrinker.c | 2 ++
> >  3 files changed, 6 insertions(+)
> > 
> > diff --git a/drivers/gpu/drm/i915/gem/i915_gem_shrinker.c b/drivers/gpu/drm/i915/gem/i915_gem_shrinker.c
> > index 3a926a8755c6..cd0372a1d936 100644
> > --- a/drivers/gpu/drm/i915/gem/i915_gem_shrinker.c
> > +++ b/drivers/gpu/drm/i915/gem/i915_gem_shrinker.c
> > @@ -4,6 +4,8 @@
> >   * Copyright © 2008-2015 Intel Corporation
> >   */
> >  
> > +#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
> > +
> >  #include <linux/oom.h>
> >  #include <linux/sched/mm.h>
> >  #include <linux/shmem_fs.h>
> > diff --git a/drivers/gpu/drm/msm/msm_gem_shrinker.c b/drivers/gpu/drm/msm/msm_gem_shrinker.c
> > index 722d61668a97..0620d441a2cc 100644
> > --- a/drivers/gpu/drm/msm/msm_gem_shrinker.c
> > +++ b/drivers/gpu/drm/msm/msm_gem_shrinker.c
> > @@ -4,6 +4,8 @@
> >   * Author: Rob Clark <robdclark@gmail.com>
> >   */
> >  
> > +#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
> > +
> >  #include "msm_drv.h"
> >  #include "msm_gem.h"
> >  
> > diff --git a/drivers/gpu/drm/panfrost/panfrost_gem_shrinker.c b/drivers/gpu/drm/panfrost/panfrost_gem_shrinker.c
> > index 458f0fa68111..b9d0e821c3f6 100644
> > --- a/drivers/gpu/drm/panfrost/panfrost_gem_shrinker.c
> > +++ b/drivers/gpu/drm/panfrost/panfrost_gem_shrinker.c
> > @@ -6,6 +6,8 @@
> >   * Author: Rob Clark <robdclark@gmail.com>
> >   */
> >  
> > +#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
> > +
> >  #include <linux/list.h>
> >  
> >  #include <drm/drm_device.h>
> > -- 
> > 2.22.0
> >
Daniel Vetter Jan. 29, 2020, 8:11 a.m. UTC | #4
On Tue, Jan 28, 2020 at 04:58:07PM -0300, Ezequiel Garcia wrote:
> On Wed, 2020-01-22 at 09:04 +0100, Daniel Vetter wrote:
> > On Sat, Dec 14, 2019 at 01:20:49PM -0300, Ezequiel Garcia wrote:
> > > It's not entirely obvious why these messages have
> > > "info" severity. In any case, add a proper driver prefix
> > > to give the user a bit of context of where they are coming from.
> > 
> > So the i915 one makes some sense, it's for oom. Which shouldn't happen
> > often. Then panfrost/msm ones are imo dubious and should be changed to one
> > of the drm debug ones. Looks like copypasta fail, we might want to change
> > all of them to drm debugging ones (well maybe keep the i915 one as a drm
> > info output).
> 
> Sounds good. I can submit follow up patches for that.
> Meanwhile, this patch seems good to go, right?

First adding the prefix to then remove it (at least for panfrost/msm)
seems like unecessary detour to me. But up to respective maintainers.
-Daniel

> 
> Thanks,
> Ezequiel
> 
> > -Daniel
> > 
> > > Signed-off-by: Ezequiel Garcia <ezequiel@collabora.com>
> > > ---
> > >  drivers/gpu/drm/i915/gem/i915_gem_shrinker.c     | 2 ++
> > >  drivers/gpu/drm/msm/msm_gem_shrinker.c           | 2 ++
> > >  drivers/gpu/drm/panfrost/panfrost_gem_shrinker.c | 2 ++
> > >  3 files changed, 6 insertions(+)
> > > 
> > > diff --git a/drivers/gpu/drm/i915/gem/i915_gem_shrinker.c b/drivers/gpu/drm/i915/gem/i915_gem_shrinker.c
> > > index 3a926a8755c6..cd0372a1d936 100644
> > > --- a/drivers/gpu/drm/i915/gem/i915_gem_shrinker.c
> > > +++ b/drivers/gpu/drm/i915/gem/i915_gem_shrinker.c
> > > @@ -4,6 +4,8 @@
> > >   * Copyright © 2008-2015 Intel Corporation
> > >   */
> > >  
> > > +#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
> > > +
> > >  #include <linux/oom.h>
> > >  #include <linux/sched/mm.h>
> > >  #include <linux/shmem_fs.h>
> > > diff --git a/drivers/gpu/drm/msm/msm_gem_shrinker.c b/drivers/gpu/drm/msm/msm_gem_shrinker.c
> > > index 722d61668a97..0620d441a2cc 100644
> > > --- a/drivers/gpu/drm/msm/msm_gem_shrinker.c
> > > +++ b/drivers/gpu/drm/msm/msm_gem_shrinker.c
> > > @@ -4,6 +4,8 @@
> > >   * Author: Rob Clark <robdclark@gmail.com>
> > >   */
> > >  
> > > +#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
> > > +
> > >  #include "msm_drv.h"
> > >  #include "msm_gem.h"
> > >  
> > > diff --git a/drivers/gpu/drm/panfrost/panfrost_gem_shrinker.c b/drivers/gpu/drm/panfrost/panfrost_gem_shrinker.c
> > > index 458f0fa68111..b9d0e821c3f6 100644
> > > --- a/drivers/gpu/drm/panfrost/panfrost_gem_shrinker.c
> > > +++ b/drivers/gpu/drm/panfrost/panfrost_gem_shrinker.c
> > > @@ -6,6 +6,8 @@
> > >   * Author: Rob Clark <robdclark@gmail.com>
> > >   */
> > >  
> > > +#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
> > > +
> > >  #include <linux/list.h>
> > >  
> > >  #include <drm/drm_device.h>
> > > -- 
> > > 2.22.0
> > > 
> 
>
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/gem/i915_gem_shrinker.c b/drivers/gpu/drm/i915/gem/i915_gem_shrinker.c
index 3a926a8755c6..cd0372a1d936 100644
--- a/drivers/gpu/drm/i915/gem/i915_gem_shrinker.c
+++ b/drivers/gpu/drm/i915/gem/i915_gem_shrinker.c
@@ -4,6 +4,8 @@ 
  * Copyright © 2008-2015 Intel Corporation
  */
 
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
 #include <linux/oom.h>
 #include <linux/sched/mm.h>
 #include <linux/shmem_fs.h>
diff --git a/drivers/gpu/drm/msm/msm_gem_shrinker.c b/drivers/gpu/drm/msm/msm_gem_shrinker.c
index 722d61668a97..0620d441a2cc 100644
--- a/drivers/gpu/drm/msm/msm_gem_shrinker.c
+++ b/drivers/gpu/drm/msm/msm_gem_shrinker.c
@@ -4,6 +4,8 @@ 
  * Author: Rob Clark <robdclark@gmail.com>
  */
 
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
 #include "msm_drv.h"
 #include "msm_gem.h"
 
diff --git a/drivers/gpu/drm/panfrost/panfrost_gem_shrinker.c b/drivers/gpu/drm/panfrost/panfrost_gem_shrinker.c
index 458f0fa68111..b9d0e821c3f6 100644
--- a/drivers/gpu/drm/panfrost/panfrost_gem_shrinker.c
+++ b/drivers/gpu/drm/panfrost/panfrost_gem_shrinker.c
@@ -6,6 +6,8 @@ 
  * Author: Rob Clark <robdclark@gmail.com>
  */
 
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
 #include <linux/list.h>
 
 #include <drm/drm_device.h>