mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [patch] vmscan: print shrink_slab symbol name on negative shrinker objects
@ 2009-03-19 23:09 David Rientjes
  2009-03-19 23:33 ` Andrew Morton
  2009-03-20  8:27 ` Ingo Molnar
  0 siblings, 2 replies; 4+ messages in thread
From: David Rientjes @ 2009-03-19 23:09 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-kernel

When a shrinker has a negative number of objects to delete, the symbol
name of the shrinker should be printed, not shrink_slab.

Signed-off-by: David Rientjes <rientjes@google.com>
---
 mm/vmscan.c |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/mm/vmscan.c b/mm/vmscan.c
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -40,6 +40,7 @@
 #include <linux/memcontrol.h>
 #include <linux/delayacct.h>
 #include <linux/sysctl.h>
+#include <linux/kallsyms.h>
 
 #include <asm/tlbflush.h>
 #include <asm/div64.h>
@@ -214,8 +215,12 @@ unsigned long shrink_slab(unsigned long scanned, gfp_t gfp_mask,
 		do_div(delta, lru_pages + 1);
 		shrinker->nr += delta;
 		if (shrinker->nr < 0) {
-			printk(KERN_ERR "%s: nr=%ld\n",
-					__func__, shrinker->nr);
+			char symname[KSYM_NAME_LEN];
+
+			if (lookup_symbol_name((unsigned long)shrinker->shrink,
+					       symname) > 0)
+				printk(KERN_ERR "shrink_slab: %s nr=%ld\n",
+				       symname, shrinker->nr);
 			shrinker->nr = max_pass;
 		}
 

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

end of thread, other threads:[~2009-03-20 10:16 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-03-19 23:09 [patch] vmscan: print shrink_slab symbol name on negative shrinker objects David Rientjes
2009-03-19 23:33 ` Andrew Morton
2009-03-20 10:15   ` David Rientjes
2009-03-20  8:27 ` Ingo Molnar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®