aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python
diff options
context:
space:
mode:
authorXishi Qiu <[email protected]>2013-02-22 16:33:59 -0800
committerLinus Torvalds <[email protected]>2013-02-23 17:50:15 -0800
commit0ebff32c3637e0ed551c017eb9599ac108ab36aa (patch)
treec6c85f235dac0a0f9f00b7f54f271ddb0a666f4b /tools/perf/scripts/python
parent194159fbcc0d6ac1351837d3cd7a27a4af0219a6 (diff)
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 <[email protected]> Signed-off-by: Jiang Liu <[email protected]> Tested-by: Naoya Horiguchi <[email protected]> Cc: Borislav Petkov <[email protected]> Cc: Wanpeng Li <[email protected]> Cc: Andi Kleen <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions