staging: android: lowmemorykiller: well-marked debug print
PATCH 1/1 staging: android: lowmemorykiller: well-marked debug print
Add "lmk:" prefix to the debug print so it's easier to analyse LMK's debug output:
dmesg | grep lmk
--- drivers/staging/android/lowmemorykiller.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/android/lowmemorykiller.c +1 -1
@@ -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)
Signature · 1 line
1.7.9.5
Greg Kroah-Hartman
maintainerQuoted 3 lines · Dmitry Voytik
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
Quoted 6 lines · Greg Kroah-Hartman
Quoted 3 lines
Add "lmk:" prefix to the debug print so it's easier to analyse LMK's debug output:
dmesg | grep lmkIck, 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.
Quoted 5 lines · David Rientjes
Quoted 2 lines
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.
PATCH 1/1 staging: android: lowmemorykiller: well-marked debug print
In reply to David RientjesAdd "lowmemorykiller:" prefix to the debug print so it's easier to analyse LMK's debug output:
dmesg | grep lowmemorykiller
--- drivers/staging/android/lowmemorykiller.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/staging/android/lowmemorykiller.c +3 -1
@@ -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)
Signature · 1 line
1.7.9.5