]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commit
mm: hwpoison: ratelimit messages from unpoison_memory()
authorNaoya Horiguchi <n-horiguchi@ah.jp.nec.com>
Fri, 6 Nov 2015 02:47:26 +0000 (18:47 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 6 Nov 2015 03:34:48 +0000 (19:34 -0800)
commita5f65109026b35b654b94fdcd26a971185a53adc
tree8367ff9f1496ed3cbb8228a1266c5a924cb9b394
parentaa750fd71c242dba02ee2034e15fbd7d0cdb2461
mm: hwpoison: ratelimit messages from unpoison_memory()

Currently kernel prints out results of every single unpoison event, which
i= s not necessary because unpoison is purely a testing feature and
testers can = get little or no information from lots of lines of unpoison
log storm.  So this patch ratelimits printk in unpoison_memory().

This patch introduces a file local ratelimit_state, which adds 64 bytes to
memory-failure.o.  If we apply pr_info_ratelimited() for 8 callsite below,
2= 56 bytes is added, so it's a win.

Signed-off-by: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: Wanpeng Li <wanpeng.li@hotmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/memory-failure.c