提交 88c3bd70 编写于 作者: D David Rientjes 提交者: Linus Torvalds

vmscan: print shrink_slab symbol name on negative shrinker objects

When a shrinker has a negative number of objects to delete, the symbol
name of the shrinker should be printed, not shrink_slab.  This also makes
the error message slightly more informative.

Cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: NDavid Rientjes <rientjes@google.com>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 71aa653c
...@@ -214,8 +214,9 @@ unsigned long shrink_slab(unsigned long scanned, gfp_t gfp_mask, ...@@ -214,8 +214,9 @@ unsigned long shrink_slab(unsigned long scanned, gfp_t gfp_mask,
do_div(delta, lru_pages + 1); do_div(delta, lru_pages + 1);
shrinker->nr += delta; shrinker->nr += delta;
if (shrinker->nr < 0) { if (shrinker->nr < 0) {
printk(KERN_ERR "%s: nr=%ld\n", printk(KERN_ERR "shrink_slab: %pF negative objects to "
__func__, shrinker->nr); "delete nr=%ld\n",
shrinker->shrink, shrinker->nr);
shrinker->nr = max_pass; shrinker->nr = max_pass;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册