From: Xishi Qiu <qiuxishi@huawei.com>
To: Simon Jeons <simon.jeons@gmail.com>
Cc: Andi Kleen <andi@firstfloor.org>,
Wanpeng Li <liwanp@linux.vnet.ibm.com>,
Andrew Morton <akpm@linux-foundation.org>,
WuJianguo <wujianguo@huawei.com>, Liujiang <jiang.liu@huawei.com>,
Vyacheslav.Dubeyko@huawei.com, Borislav Petkov <bp@alien8.de>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org,
wency@cn.fujitsu.com
Subject: Re: [PATCH V2] MCE: fix an error of mce_bad_pages statistics
Date: Tue, 11 Dec 2012 13:55:15 +0800 [thread overview]
Message-ID: <50C6CAC3.1090809@huawei.com> (raw)
In-Reply-To: <1355197690.1933.20.camel@kernel.cn.ibm.com>
On 2012/12/11 11:48, Simon Jeons wrote:
> On Tue, 2012-12-11 at 04:19 +0100, Andi Kleen wrote:
>> On Mon, Dec 10, 2012 at 09:13:11PM -0600, Simon Jeons wrote:
>>> On Tue, 2012-12-11 at 04:01 +0100, Andi Kleen wrote:
>>>>> Oh, it will be putback to lru list during migration. So does your "some
>>>>> time" mean before call check_new_page?
>>>>
>>>> Yes until the next check_new_page() whenever that is. If the migration
>>>> works it will be earlier, otherwise later.
>>>
>>> But I can't figure out any page reclaim path check if the page is set
>>> PG_hwpoison, can poisoned pages be rclaimed?
>>
>> The only way to reclaim a page is to free and reallocate it.
>
> Then why there doesn't have check in reclaim path to avoid relcaim
> poisoned page?
>
> -Simon
Hi Simon,
If the page is free, it will be set PG_hwpoison, and soft_offline_page() is done.
When the page is alocated later, check_new_page() will find the poisoned page and
isolate the whole buddy block(just drop the block).
If the page is not free, soft_offline_page() try to free it first, if this is
failed, it will migrate the page, but the page is still in LRU list after migration,
migrate_pages()
unmap_and_move()
if (rc != -EAGAIN) {
...
putback_lru_page(page);
}
We can use lru_add_drain_all() to drain lru pagevec, at last free_hot_cold_page()
will be called, and free_pages_prepare() check the poisoned pages.
free_pages_prepare()
free_pages_check()
bad_page()
Is this right, Andi?
Thanks
Xishi Qiu
>>
>> -Andi
>
>
>
>
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
WARNING: multiple messages have this Message-ID (diff)
From: Xishi Qiu <qiuxishi@huawei.com>
To: Simon Jeons <simon.jeons@gmail.com>
Cc: Andi Kleen <andi@firstfloor.org>,
Wanpeng Li <liwanp@linux.vnet.ibm.com>,
Andrew Morton <akpm@linux-foundation.org>,
WuJianguo <wujianguo@huawei.com>, Liujiang <jiang.liu@huawei.com>,
<Vyacheslav.Dubeyko@huawei.com>, Borislav Petkov <bp@alien8.de>,
<linux-mm@kvack.org>, <linux-kernel@vger.kernel.org>,
<wency@cn.fujitsu.com>
Subject: Re: [PATCH V2] MCE: fix an error of mce_bad_pages statistics
Date: Tue, 11 Dec 2012 13:55:15 +0800 [thread overview]
Message-ID: <50C6CAC3.1090809@huawei.com> (raw)
In-Reply-To: <1355197690.1933.20.camel@kernel.cn.ibm.com>
On 2012/12/11 11:48, Simon Jeons wrote:
> On Tue, 2012-12-11 at 04:19 +0100, Andi Kleen wrote:
>> On Mon, Dec 10, 2012 at 09:13:11PM -0600, Simon Jeons wrote:
>>> On Tue, 2012-12-11 at 04:01 +0100, Andi Kleen wrote:
>>>>> Oh, it will be putback to lru list during migration. So does your "some
>>>>> time" mean before call check_new_page?
>>>>
>>>> Yes until the next check_new_page() whenever that is. If the migration
>>>> works it will be earlier, otherwise later.
>>>
>>> But I can't figure out any page reclaim path check if the page is set
>>> PG_hwpoison, can poisoned pages be rclaimed?
>>
>> The only way to reclaim a page is to free and reallocate it.
>
> Then why there doesn't have check in reclaim path to avoid relcaim
> poisoned page?
>
> -Simon
Hi Simon,
If the page is free, it will be set PG_hwpoison, and soft_offline_page() is done.
When the page is alocated later, check_new_page() will find the poisoned page and
isolate the whole buddy block(just drop the block).
If the page is not free, soft_offline_page() try to free it first, if this is
failed, it will migrate the page, but the page is still in LRU list after migration,
migrate_pages()
unmap_and_move()
if (rc != -EAGAIN) {
...
putback_lru_page(page);
}
We can use lru_add_drain_all() to drain lru pagevec, at last free_hot_cold_page()
will be called, and free_pages_prepare() check the poisoned pages.
free_pages_prepare()
free_pages_check()
bad_page()
Is this right, Andi?
Thanks
Xishi Qiu
>>
>> -Andi
>
>
>
>
next prev parent reply other threads:[~2012-12-11 5:55 UTC|newest]
Thread overview: 66+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-07 8:48 [PATCH V2] MCE: fix an error of mce_bad_pages statistics Xishi Qiu
2012-12-07 8:48 ` Xishi Qiu
2012-12-07 14:33 ` Borislav Petkov
2012-12-07 14:33 ` Borislav Petkov
2012-12-07 22:11 ` Andrew Morton
2012-12-07 22:11 ` Andrew Morton
2012-12-07 22:41 ` Borislav Petkov
2012-12-07 22:41 ` Borislav Petkov
2012-12-10 4:33 ` Xishi Qiu
2012-12-10 4:33 ` Xishi Qiu
2012-12-10 8:33 ` Wanpeng Li
2012-12-10 8:33 ` Wanpeng Li
2012-12-10 9:06 ` Xishi Qiu
2012-12-10 9:06 ` Xishi Qiu
2012-12-10 10:47 ` Simon Jeons
2012-12-10 10:47 ` Simon Jeons
2012-12-10 11:16 ` Xishi Qiu
2012-12-10 11:16 ` Xishi Qiu
2012-12-10 11:39 ` Wanpeng Li
2012-12-10 11:54 ` Xishi Qiu
2012-12-10 11:54 ` Xishi Qiu
2012-12-10 12:11 ` Borislav Petkov
2012-12-10 12:11 ` Borislav Petkov
2012-12-10 15:39 ` Andi Kleen
2012-12-10 15:39 ` Andi Kleen
2012-12-10 11:39 ` Wanpeng Li
2012-12-10 11:58 ` Simon Jeons
2012-12-10 11:58 ` Simon Jeons
[not found] ` <1355140561.1821.5.camel@kernel.cn.ibm.com>
[not found] ` <50C5D844.8050707@huawei.com>
2012-12-10 12:47 ` Simon Jeons
2012-12-10 12:47 ` Simon Jeons
2012-12-11 1:16 ` Wanpeng Li
2012-12-11 1:16 ` Wanpeng Li
2012-12-11 6:49 ` Xishi Qiu
2012-12-11 6:49 ` Xishi Qiu
2012-12-11 8:02 ` Wanpeng Li
2012-12-11 8:02 ` Wanpeng Li
2012-12-10 15:38 ` Andi Kleen
2012-12-10 15:38 ` Andi Kleen
2012-12-11 1:49 ` Simon Jeons
2012-12-11 1:49 ` Simon Jeons
2012-12-11 2:03 ` Andi Kleen
2012-12-11 2:03 ` Andi Kleen
2012-12-11 2:14 ` Simon Jeons
2012-12-11 2:14 ` Simon Jeons
2012-12-11 3:01 ` Andi Kleen
2012-12-11 3:01 ` Andi Kleen
2012-12-11 3:13 ` Simon Jeons
2012-12-11 3:13 ` Simon Jeons
2012-12-11 3:19 ` Andi Kleen
2012-12-11 3:19 ` Andi Kleen
2012-12-11 3:48 ` Simon Jeons
2012-12-11 3:48 ` Simon Jeons
2012-12-11 5:55 ` Xishi Qiu [this message]
2012-12-11 5:55 ` Xishi Qiu
2012-12-11 6:34 ` Wanpeng Li
2012-12-11 6:34 ` Wanpeng Li
2012-12-11 2:25 ` Xishi Qiu
2012-12-11 2:25 ` Xishi Qiu
2012-12-11 2:45 ` Fengguang Wu
2012-12-11 2:45 ` Fengguang Wu
2012-12-11 2:58 ` Andi Kleen
2012-12-11 2:58 ` Andi Kleen
2012-12-11 3:25 ` Xishi Qiu
2012-12-11 3:25 ` Xishi Qiu
2012-12-11 3:36 ` Andi Kleen
2012-12-11 3:36 ` Andi Kleen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=50C6CAC3.1090809@huawei.com \
--to=qiuxishi@huawei.com \
--cc=Vyacheslav.Dubeyko@huawei.com \
--cc=akpm@linux-foundation.org \
--cc=andi@firstfloor.org \
--cc=bp@alien8.de \
--cc=jiang.liu@huawei.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=liwanp@linux.vnet.ibm.com \
--cc=simon.jeons@gmail.com \
--cc=wency@cn.fujitsu.com \
--cc=wujianguo@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.