Re: [PATCH] MCE: fix an error of mce_bad_pages statistics

2012-12-06 Thread Borislav Petkov
On Fri, Dec 07, 2012 at 03:35:15PM +0800, Xishi Qiu wrote: > Hi Borislav, you mean we should move this to the beginning of > soft_offline_page()? > > soft_offline_page() > { > ... > get_any_page() > ... > /* >* Synchronized using the page lock with memory_failure()

Re: [PATCH] MCE: fix an error of mce_bad_pages statistics

2012-12-06 Thread Xishi Qiu
On 2012/12/7 15:25, Borislav Petkov wrote: > On Fri, Dec 07, 2012 at 10:53:41AM +0800, Xishi Qiu wrote: >> On x86 platform, if we use "/sys/devices/system/memory/soft_offline_page" to >> offline a >> free page twice, the value of mce_bad_pages will be added twice. So this is >> an error, >> sinc

Re: [PATCH] MCE: fix an error of mce_bad_pages statistics

2012-12-06 Thread Borislav Petkov
On Fri, Dec 07, 2012 at 10:53:41AM +0800, Xishi Qiu wrote: > On x86 platform, if we use "/sys/devices/system/memory/soft_offline_page" to > offline a > free page twice, the value of mce_bad_pages will be added twice. So this is > an error, > since the page was already marked HWPoison, we should s

[PATCH] MCE: fix an error of mce_bad_pages statistics

2012-12-06 Thread Xishi Qiu
On x86 platform, if we use "/sys/devices/system/memory/soft_offline_page" to offline a free page twice, the value of mce_bad_pages will be added twice. So this is an error, since the page was already marked HWPoison, we should skip the page and don't add the value of mce_bad_pages. $ cat /proc/