All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] staging: android: lowmemorykiller: well-marked debug print
@ 2013-03-15 20:00 Dmitry Voytik
  2013-03-15 20:09 ` Greg Kroah-Hartman
  0 siblings, 1 reply; 5+ messages in thread
From: Dmitry Voytik @ 2013-03-15 20:00 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: David Rientjes, linux-kernel, Dmitry Voytik

Add "lmk:" prefix to the debug print so it's easier to analyse LMK's
debug output:
dmesg | grep lmk

Signed-off-by: Dmitry Voytik <dvv.kernel@gmail.com>
---
 drivers/staging/android/lowmemorykiller.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/android/lowmemorykiller.c b/drivers/staging/android/lowmemorykiller.c
index 3b91b0f..4ea7b70 100644
--- a/drivers/staging/android/lowmemorykiller.c
+++ b/drivers/staging/android/lowmemorykiller.c
@@ -60,7 +60,7 @@ static unsigned long lowmem_deathpending_timeout;
 #define lowmem_print(level, x...)			\
 	do {						\
 		if (lowmem_debug_level >= (level))	\
-			printk(x);			\
+			pr_info("lmk: " x);		\
 	} while (0)
 
 static int lowmem_shrink(struct shrinker *s, struct shrink_control *sc)
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] staging: android: lowmemorykiller: well-marked debug print
  2013-03-15 20:00 [PATCH] staging: android: lowmemorykiller: well-marked debug print Dmitry Voytik
@ 2013-03-15 20:09 ` Greg Kroah-Hartman
  2013-03-15 22:08   ` David Rientjes
  0 siblings, 1 reply; 5+ messages in thread
From: Greg Kroah-Hartman @ 2013-03-15 20:09 UTC (permalink / raw)
  To: Dmitry Voytik; +Cc: David Rientjes, linux-kernel

On Sat, Mar 16, 2013 at 12:00:42AM +0400, Dmitry Voytik wrote:
> Add "lmk:" prefix to the debug print so it's easier to analyse LMK's
> debug output:
> dmesg | grep lmk

Ick, no, please use the proper interface for this (i.e. pr_fmt).

greg k-h

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] staging: android: lowmemorykiller: well-marked debug print
  2013-03-15 20:09 ` Greg Kroah-Hartman
@ 2013-03-15 22:08   ` David Rientjes
  2013-03-16  7:14     ` Dmitry Voytik
  2013-03-16  7:37     ` Dmitry Voytik
  0 siblings, 2 replies; 5+ messages in thread
From: David Rientjes @ 2013-03-15 22:08 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: Dmitry Voytik, linux-kernel

On Fri, 15 Mar 2013, Greg Kroah-Hartman wrote:

> > Add "lmk:" prefix to the debug print so it's easier to analyse LMK's
> > debug output:
> > dmesg | grep lmk
> 
> Ick, no, please use the proper interface for this (i.e. pr_fmt).
> 

And I'm sure that mysterious new "lmk:" messages appearing in the kernel 
log will be understood by about 0.00001% of people.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] staging: android: lowmemorykiller: well-marked debug print
  2013-03-15 22:08   ` David Rientjes
@ 2013-03-16  7:14     ` Dmitry Voytik
  2013-03-16  7:37     ` Dmitry Voytik
  1 sibling, 0 replies; 5+ messages in thread
From: Dmitry Voytik @ 2013-03-16  7:14 UTC (permalink / raw)
  To: David Rientjes; +Cc: Greg Kroah-Hartman, linux-kernel

On Fri, Mar 15, 2013 at 03:08:52PM -0700, David Rientjes wrote:
> > Ick, no, please use the proper interface for this (i.e. pr_fmt).
> > 
> 
> And I'm sure that mysterious new "lmk:" messages appearing in the kernel 
> log will be understood by about 0.00001% of people.

David, Greg,

Thank you for fair comments. In the following e-mail I'll send the fixed
patch according to your comments.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH] staging: android: lowmemorykiller: well-marked debug print
  2013-03-15 22:08   ` David Rientjes
  2013-03-16  7:14     ` Dmitry Voytik
@ 2013-03-16  7:37     ` Dmitry Voytik
  1 sibling, 0 replies; 5+ messages in thread
From: Dmitry Voytik @ 2013-03-16  7:37 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: David Rientjes, linux-kernel, Dmitry Voytik

Add "lowmemorykiller:" prefix to the debug print so it's easier to
analyse LMK's debug output:
dmesg | grep lowmemorykiller

Signed-off-by: Dmitry Voytik <dvv.kernel@gmail.com>
---
 drivers/staging/android/lowmemorykiller.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/staging/android/lowmemorykiller.c b/drivers/staging/android/lowmemorykiller.c
index 53d80c2..fe74494 100644
--- a/drivers/staging/android/lowmemorykiller.c
+++ b/drivers/staging/android/lowmemorykiller.c
@@ -30,6 +30,8 @@
  *
  */
 
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
 #include <linux/module.h>
 #include <linux/kernel.h>
 #include <linux/mm.h>
@@ -61,7 +63,7 @@ static unsigned long lowmem_deathpending_timeout;
 #define lowmem_print(level, x...)			\
 	do {						\
 		if (lowmem_debug_level >= (level))	\
-			printk(x);			\
+			pr_info(x);			\
 	} while (0)
 
 static int lowmem_shrink(struct shrinker *s, struct shrink_control *sc)
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-03-16  7:37 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-15 20:00 [PATCH] staging: android: lowmemorykiller: well-marked debug print Dmitry Voytik
2013-03-15 20:09 ` Greg Kroah-Hartman
2013-03-15 22:08   ` David Rientjes
2013-03-16  7:14     ` Dmitry Voytik
2013-03-16  7:37     ` Dmitry Voytik

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.