Skip to contentSkip to conversation

drm: shrinker: Add a prefix on purging logs

PATCH In review Ezequiel Garcia 2 participants 5 messages Dec 14, 2019 – Jan 29, 2020

Subsystems (5)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm: shrinker: Add a prefix on purging logs

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.

---
 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(+)
drivers/gpu/drm/i915/gem/i915_gem_shrinker.c +2 -0
index 3a926a8755c6..cd0372a1d936 100644
@@ -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>
drivers/gpu/drm/msm/msm_gem_shrinker.c +2 -0
index 722d61668a97..0620d441a2cc 100644
@@ -4,6 +4,8 @@
  * Author: Rob Clark <[email protected]>
  */
 
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
 #include "msm_drv.h"
 #include "msm_gem.h"
 
drivers/gpu/drm/panfrost/panfrost_gem_shrinker.c +2 -0
index 458f0fa68111..b9d0e821c3f6 100644
@@ -6,6 +6,8 @@
  * Author: Rob Clark <[email protected]>
  */
 
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
 #include <linux/list.h>
 
 #include <drm/drm_device.h>
Signature · 6 lines
2.22.0

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
#1 lore raw
Quoted 5 lines · Ezequiel Garcia

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.

Gentle ping.

Thanks,
Ezequiel

Quoted 37 lines
---
 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(+)
drivers/gpu/drm/i915/gem/i915_gem_shrinker.c +2 -0
index 3a926a8755c6..cd0372a1d936 100644
@@ -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>
drivers/gpu/drm/msm/msm_gem_shrinker.c +2 -0
index 722d61668a97..0620d441a2cc 100644
@@ -4,6 +4,8 @@
  * Author: Rob Clark <[email protected]>
  */
 
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
 #include "msm_drv.h"
 #include "msm_gem.h"
 
drivers/gpu/drm/panfrost/panfrost_gem_shrinker.c +0 -0
index 458f0fa68111..b9d0e821c3f6 100644

drivers/gpu/drm/panfrost/panfrost_gem_shrinker.c line 13

Quoted 8 lines
drivers/gpu/drm/panfrost/panfrost_gem_shrinker.c +2 -0
@@ -6,6 +6,8 @@
  * Author: Rob Clark <[email protected]>
  */
 
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
 #include <linux/list.h>
 
 #include <drm/drm_device.h>

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#2 lore raw
In reply to Ezequiel Garcia
Quoted 3 lines · Ezequiel Garcia

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

Quoted 50 lines
---
 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(+)
drivers/gpu/drm/i915/gem/i915_gem_shrinker.c +2 -0
index 3a926a8755c6..cd0372a1d936 100644
@@ -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>
drivers/gpu/drm/msm/msm_gem_shrinker.c +2 -0
index 722d61668a97..0620d441a2cc 100644
@@ -4,6 +4,8 @@
  * Author: Rob Clark <[email protected]>
  */
 
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
 #include "msm_drv.h"
 #include "msm_gem.h"
 
drivers/gpu/drm/panfrost/panfrost_gem_shrinker.c +2 -0
index 458f0fa68111..b9d0e821c3f6 100644
@@ -6,6 +6,8 @@
  * Author: Rob Clark <[email protected]>
  */
 
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
 #include <linux/list.h>
 
 #include <drm/drm_device.h>
Signature · 1 line
2.22.0
Signature · 7 lines
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
#3 lore raw
Quoted 10 lines · Daniel Vetter
Quoted 3 lines · Ezequiel Garcia

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

Quoted 43 lines

-Daniel

Quoted 41 lines
---
 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(+)
drivers/gpu/drm/i915/gem/i915_gem_shrinker.c +2 -0
index 3a926a8755c6..cd0372a1d936 100644
@@ -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>
drivers/gpu/drm/msm/msm_gem_shrinker.c +2 -0
index 722d61668a97..0620d441a2cc 100644
@@ -4,6 +4,8 @@
  * Author: Rob Clark <[email protected]>
  */
 
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
 #include "msm_drv.h"
 #include "msm_gem.h"
 
drivers/gpu/drm/panfrost/panfrost_gem_shrinker.c +0 -0
index 458f0fa68111..b9d0e821c3f6 100644
@@ -6,6 +6,8 @@
  * Author: Rob Clark <[email protected]>
  */
 
Quoted 8 lines
Quoted 8 lines
drivers/gpu/drm/panfrost/panfrost_gem_shrinker.c +2 -0
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
 #include <linux/list.h>
 
 #include <drm/drm_device.h>
Signature · 1 line
2.22.0

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#4 lore raw
Quoted 6 lines · Ezequiel Garcia
Quoted 5 lines · Daniel Vetter
Quoted 3 lines · Ezequiel Garcia

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.

Quoted 8 lines
Quoted 5 lines

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

Quoted 57 lines

Thanks,
Ezequiel

Quoted 51 lines

-Daniel

Quoted 49 lines
---
 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(+)
drivers/gpu/drm/i915/gem/i915_gem_shrinker.c +2 -0
index 3a926a8755c6..cd0372a1d936 100644
@@ -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>
drivers/gpu/drm/msm/msm_gem_shrinker.c +2 -0
index 722d61668a97..0620d441a2cc 100644
@@ -4,6 +4,8 @@
  * Author: Rob Clark <[email protected]>
  */
 
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
 #include "msm_drv.h"
 #include "msm_gem.h"
 
drivers/gpu/drm/panfrost/panfrost_gem_shrinker.c +2 -0
index 458f0fa68111..b9d0e821c3f6 100644
@@ -6,6 +6,8 @@
  * Author: Rob Clark <[email protected]>
  */
 
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
 #include <linux/list.h>
 
 #include <drm/drm_device.h>
Signature · 1 line
2.22.0
Signature · 7 lines
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel