summaryrefslogtreecommitdiffstats
path: root/kernel/Kconfig.hz
diff options
context:
space:
mode:
authorXishi Qiu <qiuxishi@huawei.com>2013-02-22 16:33:59 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2013-02-23 17:50:15 -0800
commit0ebff32c3637e0ed551c017eb9599ac108ab36aa (patch)
treec6c85f235dac0a0f9f00b7f54f271ddb0a666f4b /kernel/Kconfig.hz
parent194159fbcc0d6ac1351837d3cd7a27a4af0219a6 (diff)
downloadlinux-0ebff32c3637e0ed551c017eb9599ac108ab36aa.tar.bz2
memory-failure: fix an error of mce_bad_pages statistics
When doing $ echo paddr > /sys/devices/system/memory/soft_offline_page to offline a *free* page, the value of mce_bad_pages will be added, and the page is set HWPoison flag, but it is still managed by page buddy alocator. $ cat /proc/meminfo | grep HardwareCorrupted shows the value. If we offline the same page, the value of mce_bad_pages will be added *again*, this means the value is incorrect now. Assume the page is still free during this short time. soft_offline_page() get_any_page() "else if (is_free_buddy_page(p))" branch return 0 "goto done"; "atomic_long_add(1, &mce_bad_pages);" This patch: Move poisoned page check at the beginning of the function in order to fix the error. Signed-off-by: Xishi Qiu <qiuxishi@huawei.com> Signed-off-by: Jiang Liu <jiang.liu@huawei.com> Tested-by: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com> Cc: Borislav Petkov <bp@alien8.de> Cc: Wanpeng Li <liwanp@linux.vnet.ibm.com> Cc: Andi Kleen <andi@firstfloor.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel/Kconfig.hz')
0 files changed, 0 insertions, 0 deletions