* [PATCH v2 1/4] mm/hwpoison: fix traverse hugetlbfs page to avoid printk flood
@ 2013-09-02 23:36 Wanpeng Li
2013-09-02 23:36 ` [PATCH v2 2/4] mm/hwpoison: fix miss catch transparent huge page Wanpeng Li
` (2 more replies)
0 siblings, 3 replies; 13+ messages in thread
From: Wanpeng Li @ 2013-09-02 23:36 UTC (permalink / raw)
To: Andrew Morton
Cc: Andi Kleen, Fengguang Wu, Naoya Horiguchi, Tony Luck, gong.chen,
linux-mm, linux-kernel, Wanpeng Li
madvise_hwpoison won't check if the page is small page or huge page and traverse
in small page granularity against the range unconditional, which result in a printk
flood "MCE xxx: already hardware poisoned" if the page is huge page. This patch fix
it by increase compound_order(compound_head(page)) for huge page iterator.
Testcase:
#define _GNU_SOURCE
#include <stdlib.h>
#include <stdio.h>
#include <sys/mman.h>
#include <unistd.h>
#include <fcntl.h>
#include <sys/types.h>
#include <errno.h>
#define PAGES_TO_TEST 3
#define PAGE_SIZE 4096 * 512
int main(void)
{
char *mem;
int i;
mem = mmap(NULL, PAGES_TO_TEST * PAGE_SIZE,
PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS | MAP_HUGETLB, 0, 0);
if (madvise(mem, PAGES_TO_TEST * PAGE_SIZE, MADV_HWPOISON) == -1)
return -1;
munmap(mem, PAGES_TO_TEST * PAGE_SIZE);
return 0;
}
Reviewed-by: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
Signed-off-by: Wanpeng Li <liwanp@linux.vnet.ibm.com>
---
mm/madvise.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/mm/madvise.c b/mm/madvise.c
index 6975bc8..539eeb9 100644
--- a/mm/madvise.c
+++ b/mm/madvise.c
@@ -343,10 +343,11 @@ static long madvise_remove(struct vm_area_struct *vma,
*/
static int madvise_hwpoison(int bhv, unsigned long start, unsigned long end)
{
+ struct page *p;
if (!capable(CAP_SYS_ADMIN))
return -EPERM;
- for (; start < end; start += PAGE_SIZE) {
- struct page *p;
+ for (; start < end; start += PAGE_SIZE <<
+ compound_order(compound_head(p))) {
int ret;
ret = get_user_pages_fast(start, 1, 0, &p);
--
1.8.1.2
--
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>
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH v2 2/4] mm/hwpoison: fix miss catch transparent huge page
2013-09-02 23:36 [PATCH v2 1/4] mm/hwpoison: fix traverse hugetlbfs page to avoid printk flood Wanpeng Li
@ 2013-09-02 23:36 ` Wanpeng Li
2013-09-03 0:20 ` Naoya Horiguchi
2013-09-03 3:15 ` Chen Gong
2013-09-02 23:36 ` [PATCH v2 3/4] mm/hwpoison: fix false report 2nd try page recovery Wanpeng Li
2013-09-02 23:36 ` [PATCH v2 4/4] mm/hwpoison: fix the lack of one reference count against poisoned page Wanpeng Li
2 siblings, 2 replies; 13+ messages in thread
From: Wanpeng Li @ 2013-09-02 23:36 UTC (permalink / raw)
To: Andrew Morton
Cc: Andi Kleen, Fengguang Wu, Naoya Horiguchi, Tony Luck, gong.chen,
linux-mm, linux-kernel, Wanpeng Li
Changelog:
*v1 -> v2: reverse PageTransHuge(page) && !PageHuge(page) check
PageTransHuge() can't guarantee the page is transparent huge page since it
return true for both transparent huge and hugetlbfs pages. This patch fix
it by check the page is also !hugetlbfs page.
Before patch:
[ 121.571128] Injecting memory failure at pfn 23a200
[ 121.571141] MCE 0x23a200: huge page recovery: Delayed
[ 140.355100] MCE: Memory failure is now running on 0x23a200
After patch:
[ 94.290793] Injecting memory failure at pfn 23a000
[ 94.290800] MCE 0x23a000: huge page recovery: Delayed
[ 105.722303] MCE: Software-unpoisoned page 0x23a000
Signed-off-by: Wanpeng Li <liwanp@linux.vnet.ibm.com>
---
mm/memory-failure.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mm/memory-failure.c b/mm/memory-failure.c
index e28ee77..b114570 100644
--- a/mm/memory-failure.c
+++ b/mm/memory-failure.c
@@ -1349,7 +1349,7 @@ int unpoison_memory(unsigned long pfn)
* worked by memory_failure() and the page lock is not held yet.
* In such case, we yield to memory_failure() and make unpoison fail.
*/
- if (PageTransHuge(page)) {
+ if (!PageHuge(page) && PageTransHuge(page)) {
pr_info("MCE: Memory failure is now running on %#lx\n", pfn);
return 0;
}
--
1.8.1.2
--
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>
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH v2 3/4] mm/hwpoison: fix false report 2nd try page recovery
2013-09-02 23:36 [PATCH v2 1/4] mm/hwpoison: fix traverse hugetlbfs page to avoid printk flood Wanpeng Li
2013-09-02 23:36 ` [PATCH v2 2/4] mm/hwpoison: fix miss catch transparent huge page Wanpeng Li
@ 2013-09-02 23:36 ` Wanpeng Li
2013-09-02 23:36 ` [PATCH v2 4/4] mm/hwpoison: fix the lack of one reference count against poisoned page Wanpeng Li
2 siblings, 0 replies; 13+ messages in thread
From: Wanpeng Li @ 2013-09-02 23:36 UTC (permalink / raw)
To: Andrew Morton
Cc: Andi Kleen, Fengguang Wu, Naoya Horiguchi, Tony Luck, gong.chen,
linux-mm, linux-kernel, Wanpeng Li
If the page is poisoned by software inject w/ MF_COUNT_INCREASED flag, there
is a false report 2nd try page recovery which is not truth, this patch fix it
by report first try free buddy page recovery if MF_COUNT_INCREASED is set.
Before patch:
[ 346.332041] Injecting memory failure at pfn 200010
[ 346.332189] MCE 0x200010: free buddy, 2nd try page recovery: Delayed
After patch:
[ 297.742600] Injecting memory failure at pfn 200010
[ 297.742941] MCE 0x200010: free buddy page recovery: Delayed
Reviewed-by: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
Signed-off-by: Wanpeng Li <liwanp@linux.vnet.ibm.com>
---
mm/memory-failure.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/mm/memory-failure.c b/mm/memory-failure.c
index b114570..6293164 100644
--- a/mm/memory-failure.c
+++ b/mm/memory-failure.c
@@ -1114,8 +1114,10 @@ int memory_failure(unsigned long pfn, int trapno, int flags)
* shake_page could have turned it free.
*/
if (is_free_buddy_page(p)) {
- action_result(pfn, "free buddy, 2nd try",
- DELAYED);
+ if (flags & MF_COUNT_INCREASED)
+ action_result(pfn, "free buddy", DELAYED);
+ else
+ action_result(pfn, "free buddy, 2nd try", DELAYED);
return 0;
}
action_result(pfn, "non LRU", IGNORED);
--
1.7.5.4
--
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>
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH v2 4/4] mm/hwpoison: fix the lack of one reference count against poisoned page
2013-09-02 23:36 [PATCH v2 1/4] mm/hwpoison: fix traverse hugetlbfs page to avoid printk flood Wanpeng Li
2013-09-02 23:36 ` [PATCH v2 2/4] mm/hwpoison: fix miss catch transparent huge page Wanpeng Li
2013-09-02 23:36 ` [PATCH v2 3/4] mm/hwpoison: fix false report 2nd try page recovery Wanpeng Li
@ 2013-09-02 23:36 ` Wanpeng Li
2 siblings, 0 replies; 13+ messages in thread
From: Wanpeng Li @ 2013-09-02 23:36 UTC (permalink / raw)
To: Andrew Morton
Cc: Andi Kleen, Fengguang Wu, Naoya Horiguchi, Tony Luck, gong.chen,
linux-mm, linux-kernel, Wanpeng Li
The lack of one reference count against poisoned page for hwpoison_inject w/o
hwpoison_filter enabled result in hwpoison detect -1 users still referenced
the page, however, the number should be 0 except the poison handler held one
after successfully unmap. This patch fix it by hold one referenced count against
poisoned page for hwpoison_inject w/ and w/o hwpoison_filter enabled.
Before patch:
[ 71.902112] Injecting memory failure at pfn 224706
[ 71.902137] MCE 0x224706: dirty LRU page recovery: Failed
[ 71.902138] MCE 0x224706: dirty LRU page still referenced by -1 users
After patch:
[ 94.710860] Injecting memory failure at pfn 215b68
[ 94.710885] MCE 0x215b68: dirty LRU page recovery: Recovered
Reviewed-by: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
Signed-off-by: Wanpeng Li <liwanp@linux.vnet.ibm.com>
---
mm/hwpoison-inject.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/mm/hwpoison-inject.c b/mm/hwpoison-inject.c
index afc2daa..4c84678 100644
--- a/mm/hwpoison-inject.c
+++ b/mm/hwpoison-inject.c
@@ -20,8 +20,6 @@ static int hwpoison_inject(void *data, u64 val)
if (!capable(CAP_SYS_ADMIN))
return -EPERM;
- if (!hwpoison_filter_enable)
- goto inject;
if (!pfn_valid(pfn))
return -ENXIO;
@@ -33,6 +31,9 @@ static int hwpoison_inject(void *data, u64 val)
if (!get_page_unless_zero(hpage))
return 0;
+ if (!hwpoison_filter_enable)
+ goto inject;
+
if (!PageLRU(p) && !PageHuge(p))
shake_page(p, 0);
/*
--
1.8.1.2
--
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>
^ permalink raw reply related [flat|nested] 13+ messages in thread
* Re: [PATCH v2 2/4] mm/hwpoison: fix miss catch transparent huge page
2013-09-02 23:36 ` [PATCH v2 2/4] mm/hwpoison: fix miss catch transparent huge page Wanpeng Li
@ 2013-09-03 0:20 ` Naoya Horiguchi
2013-09-03 3:15 ` Chen Gong
1 sibling, 0 replies; 13+ messages in thread
From: Naoya Horiguchi @ 2013-09-03 0:20 UTC (permalink / raw)
To: Wanpeng Li
Cc: Andrew Morton, Andi Kleen, Fengguang Wu, Tony Luck, gong.chen,
linux-mm, linux-kernel
On Tue, Sep 03, 2013 at 07:36:44AM +0800, Wanpeng Li wrote:
> Changelog:
> *v1 -> v2: reverse PageTransHuge(page) && !PageHuge(page) check
>
> PageTransHuge() can't guarantee the page is transparent huge page since it
> return true for both transparent huge and hugetlbfs pages. This patch fix
> it by check the page is also !hugetlbfs page.
>
> Before patch:
>
> [ 121.571128] Injecting memory failure at pfn 23a200
> [ 121.571141] MCE 0x23a200: huge page recovery: Delayed
> [ 140.355100] MCE: Memory failure is now running on 0x23a200
>
> After patch:
>
> [ 94.290793] Injecting memory failure at pfn 23a000
> [ 94.290800] MCE 0x23a000: huge page recovery: Delayed
> [ 105.722303] MCE: Software-unpoisoned page 0x23a000
>
> Signed-off-by: Wanpeng Li <liwanp@linux.vnet.ibm.com>
Thanks!
Reviewed-by: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
> ---
> mm/memory-failure.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/mm/memory-failure.c b/mm/memory-failure.c
> index e28ee77..b114570 100644
> --- a/mm/memory-failure.c
> +++ b/mm/memory-failure.c
> @@ -1349,7 +1349,7 @@ int unpoison_memory(unsigned long pfn)
> * worked by memory_failure() and the page lock is not held yet.
> * In such case, we yield to memory_failure() and make unpoison fail.
> */
> - if (PageTransHuge(page)) {
> + if (!PageHuge(page) && PageTransHuge(page)) {
> pr_info("MCE: Memory failure is now running on %#lx\n", pfn);
> return 0;
> }
> --
> 1.8.1.2
>
> --
> 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>
>
--
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>
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH v2 2/4] mm/hwpoison: fix miss catch transparent huge page
2013-09-02 23:36 ` [PATCH v2 2/4] mm/hwpoison: fix miss catch transparent huge page Wanpeng Li
2013-09-03 0:20 ` Naoya Horiguchi
@ 2013-09-03 3:15 ` Chen Gong
2013-09-03 4:18 ` Wanpeng Li
` (2 more replies)
1 sibling, 3 replies; 13+ messages in thread
From: Chen Gong @ 2013-09-03 3:15 UTC (permalink / raw)
To: Wanpeng Li
Cc: Andrew Morton, Andi Kleen, Fengguang Wu, Naoya Horiguchi,
Tony Luck, linux-mm, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 2324 bytes --]
On Tue, Sep 03, 2013 at 07:36:44AM +0800, Wanpeng Li wrote:
> Date: Tue, 3 Sep 2013 07:36:44 +0800
> From: Wanpeng Li <liwanp@linux.vnet.ibm.com>
> To: Andrew Morton <akpm@linux-foundation.org>
> Cc: Andi Kleen <andi@firstfloor.org>, Fengguang Wu
> <fengguang.wu@intel.com>, Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>,
> Tony Luck <tony.luck@intel.com>, gong.chen@linux.intel.com,
> linux-mm@kvack.org, linux-kernel@vger.kernel.org, Wanpeng Li
> <liwanp@linux.vnet.ibm.com>
> Subject: [PATCH v2 2/4] mm/hwpoison: fix miss catch transparent huge page
> X-Mailer: git-send-email 1.7.5.4
>
> Changelog:
> *v1 -> v2: reverse PageTransHuge(page) && !PageHuge(page) check
>
> PageTransHuge() can't guarantee the page is transparent huge page since it
> return true for both transparent huge and hugetlbfs pages. This patch fix
> it by check the page is also !hugetlbfs page.
>
> Before patch:
>
> [ 121.571128] Injecting memory failure at pfn 23a200
> [ 121.571141] MCE 0x23a200: huge page recovery: Delayed
> [ 140.355100] MCE: Memory failure is now running on 0x23a200
>
> After patch:
>
> [ 94.290793] Injecting memory failure at pfn 23a000
> [ 94.290800] MCE 0x23a000: huge page recovery: Delayed
> [ 105.722303] MCE: Software-unpoisoned page 0x23a000
>
> Signed-off-by: Wanpeng Li <liwanp@linux.vnet.ibm.com>
> ---
> mm/memory-failure.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/mm/memory-failure.c b/mm/memory-failure.c
> index e28ee77..b114570 100644
> --- a/mm/memory-failure.c
> +++ b/mm/memory-failure.c
> @@ -1349,7 +1349,7 @@ int unpoison_memory(unsigned long pfn)
> * worked by memory_failure() and the page lock is not held yet.
> * In such case, we yield to memory_failure() and make unpoison fail.
> */
> - if (PageTransHuge(page)) {
> + if (!PageHuge(page) && PageTransHuge(page)) {
> pr_info("MCE: Memory failure is now running on %#lx\n", pfn);
> return 0;
> }
Not sure which git tree should be used to apply this patch series? I assume
this patch series follows this link: https://lkml.org/lkml/2013/8/26/76.
In unpoison_memory we already have
if (PageHuge(page)) {
...
return 0;
}
so it looks like this patch is redundant.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH v2 2/4] mm/hwpoison: fix miss catch transparent huge page
2013-09-03 3:15 ` Chen Gong
@ 2013-09-03 4:18 ` Wanpeng Li
2013-09-03 7:59 ` Wanpeng Li
2013-09-03 7:59 ` Wanpeng Li
2013-09-03 4:18 ` Wanpeng Li
[not found] ` <52256342.4ad52a0a.2e24.ffff8c60SMTPIN_ADDED_BROKEN@mx.google.com>
2 siblings, 2 replies; 13+ messages in thread
From: Wanpeng Li @ 2013-09-03 4:18 UTC (permalink / raw)
To: Chen Gong
Cc: Andrew Morton, Andi Kleen, Fengguang Wu, Naoya Horiguchi,
Tony Luck, linux-mm, linux-kernel
On Mon, Sep 02, 2013 at 11:15:19PM -0400, Chen Gong wrote:
>On Tue, Sep 03, 2013 at 07:36:44AM +0800, Wanpeng Li wrote:
>> Date: Tue, 3 Sep 2013 07:36:44 +0800
>> From: Wanpeng Li <liwanp@linux.vnet.ibm.com>
>> To: Andrew Morton <akpm@linux-foundation.org>
>> Cc: Andi Kleen <andi@firstfloor.org>, Fengguang Wu
>> <fengguang.wu@intel.com>, Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>,
>> Tony Luck <tony.luck@intel.com>, gong.chen@linux.intel.com,
>> linux-mm@kvack.org, linux-kernel@vger.kernel.org, Wanpeng Li
>> <liwanp@linux.vnet.ibm.com>
>> Subject: [PATCH v2 2/4] mm/hwpoison: fix miss catch transparent huge page
>> X-Mailer: git-send-email 1.7.5.4
>>
>> Changelog:
>> *v1 -> v2: reverse PageTransHuge(page) && !PageHuge(page) check
>>
>> PageTransHuge() can't guarantee the page is transparent huge page since it
>> return true for both transparent huge and hugetlbfs pages. This patch fix
>> it by check the page is also !hugetlbfs page.
>>
>> Before patch:
>>
>> [ 121.571128] Injecting memory failure at pfn 23a200
>> [ 121.571141] MCE 0x23a200: huge page recovery: Delayed
>> [ 140.355100] MCE: Memory failure is now running on 0x23a200
>>
>> After patch:
>>
>> [ 94.290793] Injecting memory failure at pfn 23a000
>> [ 94.290800] MCE 0x23a000: huge page recovery: Delayed
>> [ 105.722303] MCE: Software-unpoisoned page 0x23a000
>>
>> Signed-off-by: Wanpeng Li <liwanp@linux.vnet.ibm.com>
>> ---
>> mm/memory-failure.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/mm/memory-failure.c b/mm/memory-failure.c
>> index e28ee77..b114570 100644
>> --- a/mm/memory-failure.c
>> +++ b/mm/memory-failure.c
>> @@ -1349,7 +1349,7 @@ int unpoison_memory(unsigned long pfn)
>> * worked by memory_failure() and the page lock is not held yet.
>> * In such case, we yield to memory_failure() and make unpoison fail.
>> */
>> - if (PageTransHuge(page)) {
>> + if (!PageHuge(page) && PageTransHuge(page)) {
>> pr_info("MCE: Memory failure is now running on %#lx\n", pfn);
>> return 0;
>> }
>
>Not sure which git tree should be used to apply this patch series? I assume
>this patch series follows this link: https://lkml.org/lkml/2013/8/26/76.
>
mmotm tree or linux-next. ;-)
>In unpoison_memory we already have
> if (PageHuge(page)) {
> ...
> return 0;
> }
>so it looks like this patch is redundant.
- Do you aware there is condition before go to this check?
- Do you also analysis why the check can't catch the hugetlbfs page
through the dump information?
Regards,
Wanpeng Li
--
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>
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH v2 2/4] mm/hwpoison: fix miss catch transparent huge page
2013-09-03 3:15 ` Chen Gong
2013-09-03 4:18 ` Wanpeng Li
@ 2013-09-03 4:18 ` Wanpeng Li
[not found] ` <52256342.4ad52a0a.2e24.ffff8c60SMTPIN_ADDED_BROKEN@mx.google.com>
2 siblings, 0 replies; 13+ messages in thread
From: Wanpeng Li @ 2013-09-03 4:18 UTC (permalink / raw)
To: Chen Gong
Cc: Andrew Morton, Andi Kleen, Fengguang Wu, Naoya Horiguchi,
Tony Luck, linux-mm, linux-kernel
On Mon, Sep 02, 2013 at 11:15:19PM -0400, Chen Gong wrote:
>On Tue, Sep 03, 2013 at 07:36:44AM +0800, Wanpeng Li wrote:
>> Date: Tue, 3 Sep 2013 07:36:44 +0800
>> From: Wanpeng Li <liwanp@linux.vnet.ibm.com>
>> To: Andrew Morton <akpm@linux-foundation.org>
>> Cc: Andi Kleen <andi@firstfloor.org>, Fengguang Wu
>> <fengguang.wu@intel.com>, Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>,
>> Tony Luck <tony.luck@intel.com>, gong.chen@linux.intel.com,
>> linux-mm@kvack.org, linux-kernel@vger.kernel.org, Wanpeng Li
>> <liwanp@linux.vnet.ibm.com>
>> Subject: [PATCH v2 2/4] mm/hwpoison: fix miss catch transparent huge page
>> X-Mailer: git-send-email 1.7.5.4
>>
>> Changelog:
>> *v1 -> v2: reverse PageTransHuge(page) && !PageHuge(page) check
>>
>> PageTransHuge() can't guarantee the page is transparent huge page since it
>> return true for both transparent huge and hugetlbfs pages. This patch fix
>> it by check the page is also !hugetlbfs page.
>>
>> Before patch:
>>
>> [ 121.571128] Injecting memory failure at pfn 23a200
>> [ 121.571141] MCE 0x23a200: huge page recovery: Delayed
>> [ 140.355100] MCE: Memory failure is now running on 0x23a200
>>
>> After patch:
>>
>> [ 94.290793] Injecting memory failure at pfn 23a000
>> [ 94.290800] MCE 0x23a000: huge page recovery: Delayed
>> [ 105.722303] MCE: Software-unpoisoned page 0x23a000
>>
>> Signed-off-by: Wanpeng Li <liwanp@linux.vnet.ibm.com>
>> ---
>> mm/memory-failure.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/mm/memory-failure.c b/mm/memory-failure.c
>> index e28ee77..b114570 100644
>> --- a/mm/memory-failure.c
>> +++ b/mm/memory-failure.c
>> @@ -1349,7 +1349,7 @@ int unpoison_memory(unsigned long pfn)
>> * worked by memory_failure() and the page lock is not held yet.
>> * In such case, we yield to memory_failure() and make unpoison fail.
>> */
>> - if (PageTransHuge(page)) {
>> + if (!PageHuge(page) && PageTransHuge(page)) {
>> pr_info("MCE: Memory failure is now running on %#lx\n", pfn);
>> return 0;
>> }
>
>Not sure which git tree should be used to apply this patch series? I assume
>this patch series follows this link: https://lkml.org/lkml/2013/8/26/76.
>
mmotm tree or linux-next. ;-)
>In unpoison_memory we already have
> if (PageHuge(page)) {
> ...
> return 0;
> }
>so it looks like this patch is redundant.
- Do you aware there is condition before go to this check?
- Do you also analysis why the check can't catch the hugetlbfs page
through the dump information?
Regards,
Wanpeng Li
--
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>
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH v2 2/4] mm/hwpoison: fix miss catch transparent huge page
2013-09-03 4:18 ` Wanpeng Li
2013-09-03 7:59 ` Wanpeng Li
@ 2013-09-03 7:59 ` Wanpeng Li
1 sibling, 0 replies; 13+ messages in thread
From: Wanpeng Li @ 2013-09-03 7:59 UTC (permalink / raw)
To: Chen Gong
Cc: Andrew Morton, Andi Kleen, Fengguang Wu, Naoya Horiguchi,
Tony Luck, linux-mm, linux-kernel
Hi Chen,
On Tue, Sep 03, 2013 at 12:18:58PM +0800, Wanpeng Li wrote:
>On Mon, Sep 02, 2013 at 11:15:19PM -0400, Chen Gong wrote:
>>On Tue, Sep 03, 2013 at 07:36:44AM +0800, Wanpeng Li wrote:
>>> Date: Tue, 3 Sep 2013 07:36:44 +0800
>>> From: Wanpeng Li <liwanp@linux.vnet.ibm.com>
>>> To: Andrew Morton <akpm@linux-foundation.org>
>>> Cc: Andi Kleen <andi@firstfloor.org>, Fengguang Wu
>>> <fengguang.wu@intel.com>, Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>,
>>> Tony Luck <tony.luck@intel.com>, gong.chen@linux.intel.com,
>>> linux-mm@kvack.org, linux-kernel@vger.kernel.org, Wanpeng Li
>>> <liwanp@linux.vnet.ibm.com>
>>> Subject: [PATCH v2 2/4] mm/hwpoison: fix miss catch transparent huge page
>>> X-Mailer: git-send-email 1.7.5.4
>>>
>>> Changelog:
>>> *v1 -> v2: reverse PageTransHuge(page) && !PageHuge(page) check
>>>
>>> PageTransHuge() can't guarantee the page is transparent huge page since it
>>> return true for both transparent huge and hugetlbfs pages. This patch fix
>>> it by check the page is also !hugetlbfs page.
>>>
>>> Before patch:
>>>
>>> [ 121.571128] Injecting memory failure at pfn 23a200
>>> [ 121.571141] MCE 0x23a200: huge page recovery: Delayed
>>> [ 140.355100] MCE: Memory failure is now running on 0x23a200
>>>
>>> After patch:
>>>
>>> [ 94.290793] Injecting memory failure at pfn 23a000
>>> [ 94.290800] MCE 0x23a000: huge page recovery: Delayed
>>> [ 105.722303] MCE: Software-unpoisoned page 0x23a000
>>>
>>> Signed-off-by: Wanpeng Li <liwanp@linux.vnet.ibm.com>
>>> ---
>>> mm/memory-failure.c | 2 +-
>>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/mm/memory-failure.c b/mm/memory-failure.c
>>> index e28ee77..b114570 100644
>>> --- a/mm/memory-failure.c
>>> +++ b/mm/memory-failure.c
>>> @@ -1349,7 +1349,7 @@ int unpoison_memory(unsigned long pfn)
>>> * worked by memory_failure() and the page lock is not held yet.
>>> * In such case, we yield to memory_failure() and make unpoison fail.
>>> */
>>> - if (PageTransHuge(page)) {
>>> + if (!PageHuge(page) && PageTransHuge(page)) {
>>> pr_info("MCE: Memory failure is now running on %#lx\n", pfn);
>>> return 0;
>>> }
>>
>>Not sure which git tree should be used to apply this patch series? I assume
>>this patch series follows this link: https://lkml.org/lkml/2013/8/26/76.
>>
>
>mmotm tree or linux-next. ;-)
>
>>In unpoison_memory we already have
>> if (PageHuge(page)) {
>> ...
>> return 0;
>> }
>>so it looks like this patch is redundant.
>
>- Do you aware there is condition before go to this check?
>- Do you also analysis why the check can't catch the hugetlbfs page
> through the dump information?
>
If I miss something, don't mind to point out. ;-)
Regards,
Wanpeng Li
>Regards,
>Wanpeng Li
>
>--
>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>
--
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>
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH v2 2/4] mm/hwpoison: fix miss catch transparent huge page
2013-09-03 4:18 ` Wanpeng Li
@ 2013-09-03 7:59 ` Wanpeng Li
2013-09-03 7:59 ` Wanpeng Li
1 sibling, 0 replies; 13+ messages in thread
From: Wanpeng Li @ 2013-09-03 7:59 UTC (permalink / raw)
To: Chen Gong
Cc: Andrew Morton, Andi Kleen, Fengguang Wu, Naoya Horiguchi,
Tony Luck, linux-mm, linux-kernel
Hi Chen,
On Tue, Sep 03, 2013 at 12:18:58PM +0800, Wanpeng Li wrote:
>On Mon, Sep 02, 2013 at 11:15:19PM -0400, Chen Gong wrote:
>>On Tue, Sep 03, 2013 at 07:36:44AM +0800, Wanpeng Li wrote:
>>> Date: Tue, 3 Sep 2013 07:36:44 +0800
>>> From: Wanpeng Li <liwanp@linux.vnet.ibm.com>
>>> To: Andrew Morton <akpm@linux-foundation.org>
>>> Cc: Andi Kleen <andi@firstfloor.org>, Fengguang Wu
>>> <fengguang.wu@intel.com>, Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>,
>>> Tony Luck <tony.luck@intel.com>, gong.chen@linux.intel.com,
>>> linux-mm@kvack.org, linux-kernel@vger.kernel.org, Wanpeng Li
>>> <liwanp@linux.vnet.ibm.com>
>>> Subject: [PATCH v2 2/4] mm/hwpoison: fix miss catch transparent huge page
>>> X-Mailer: git-send-email 1.7.5.4
>>>
>>> Changelog:
>>> *v1 -> v2: reverse PageTransHuge(page) && !PageHuge(page) check
>>>
>>> PageTransHuge() can't guarantee the page is transparent huge page since it
>>> return true for both transparent huge and hugetlbfs pages. This patch fix
>>> it by check the page is also !hugetlbfs page.
>>>
>>> Before patch:
>>>
>>> [ 121.571128] Injecting memory failure at pfn 23a200
>>> [ 121.571141] MCE 0x23a200: huge page recovery: Delayed
>>> [ 140.355100] MCE: Memory failure is now running on 0x23a200
>>>
>>> After patch:
>>>
>>> [ 94.290793] Injecting memory failure at pfn 23a000
>>> [ 94.290800] MCE 0x23a000: huge page recovery: Delayed
>>> [ 105.722303] MCE: Software-unpoisoned page 0x23a000
>>>
>>> Signed-off-by: Wanpeng Li <liwanp@linux.vnet.ibm.com>
>>> ---
>>> mm/memory-failure.c | 2 +-
>>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/mm/memory-failure.c b/mm/memory-failure.c
>>> index e28ee77..b114570 100644
>>> --- a/mm/memory-failure.c
>>> +++ b/mm/memory-failure.c
>>> @@ -1349,7 +1349,7 @@ int unpoison_memory(unsigned long pfn)
>>> * worked by memory_failure() and the page lock is not held yet.
>>> * In such case, we yield to memory_failure() and make unpoison fail.
>>> */
>>> - if (PageTransHuge(page)) {
>>> + if (!PageHuge(page) && PageTransHuge(page)) {
>>> pr_info("MCE: Memory failure is now running on %#lx\n", pfn);
>>> return 0;
>>> }
>>
>>Not sure which git tree should be used to apply this patch series? I assume
>>this patch series follows this link: https://lkml.org/lkml/2013/8/26/76.
>>
>
>mmotm tree or linux-next. ;-)
>
>>In unpoison_memory we already have
>> if (PageHuge(page)) {
>> ...
>> return 0;
>> }
>>so it looks like this patch is redundant.
>
>- Do you aware there is condition before go to this check?
>- Do you also analysis why the check can't catch the hugetlbfs page
> through the dump information?
>
If I miss something, don't mind to point out. ;-)
Regards,
Wanpeng Li
>Regards,
>Wanpeng Li
>
>--
>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>
--
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>
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH v2 2/4] mm/hwpoison: fix miss catch transparent huge page
[not found] ` <52256342.4ad52a0a.2e24.ffff8c60SMTPIN_ADDED_BROKEN@mx.google.com>
@ 2013-09-03 8:04 ` Chen Gong
2013-09-03 8:21 ` Wanpeng Li
2013-09-03 8:21 ` Wanpeng Li
0 siblings, 2 replies; 13+ messages in thread
From: Chen Gong @ 2013-09-03 8:04 UTC (permalink / raw)
To: Wanpeng Li
Cc: Andrew Morton, Andi Kleen, Fengguang Wu, Naoya Horiguchi,
Tony Luck, linux-mm, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 3817 bytes --]
On Tue, Sep 03, 2013 at 12:18:58PM +0800, Wanpeng Li wrote:
> Date: Tue, 3 Sep 2013 12:18:58 +0800
> From: Wanpeng Li <liwanp@linux.vnet.ibm.com>
> To: Chen Gong <gong.chen@linux.intel.com>
> Cc: Andrew Morton <akpm@linux-foundation.org>, Andi Kleen
> <andi@firstfloor.org>, Fengguang Wu <fengguang.wu@intel.com>, Naoya
> Horiguchi <n-horiguchi@ah.jp.nec.com>, Tony Luck <tony.luck@intel.com>,
> linux-mm@kvack.org, linux-kernel@vger.kernel.org
> Subject: Re: [PATCH v2 2/4] mm/hwpoison: fix miss catch transparent huge
> page
> User-Agent: Mutt/1.5.21 (2010-09-15)
>
> On Mon, Sep 02, 2013 at 11:15:19PM -0400, Chen Gong wrote:
> >On Tue, Sep 03, 2013 at 07:36:44AM +0800, Wanpeng Li wrote:
> >> Date: Tue, 3 Sep 2013 07:36:44 +0800
> >> From: Wanpeng Li <liwanp@linux.vnet.ibm.com>
> >> To: Andrew Morton <akpm@linux-foundation.org>
> >> Cc: Andi Kleen <andi@firstfloor.org>, Fengguang Wu
> >> <fengguang.wu@intel.com>, Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>,
> >> Tony Luck <tony.luck@intel.com>, gong.chen@linux.intel.com,
> >> linux-mm@kvack.org, linux-kernel@vger.kernel.org, Wanpeng Li
> >> <liwanp@linux.vnet.ibm.com>
> >> Subject: [PATCH v2 2/4] mm/hwpoison: fix miss catch transparent huge page
> >> X-Mailer: git-send-email 1.7.5.4
> >>
> >> Changelog:
> >> *v1 -> v2: reverse PageTransHuge(page) && !PageHuge(page) check
> >>
> >> PageTransHuge() can't guarantee the page is transparent huge page since it
> >> return true for both transparent huge and hugetlbfs pages. This patch fix
> >> it by check the page is also !hugetlbfs page.
> >>
> >> Before patch:
> >>
> >> [ 121.571128] Injecting memory failure at pfn 23a200
> >> [ 121.571141] MCE 0x23a200: huge page recovery: Delayed
> >> [ 140.355100] MCE: Memory failure is now running on 0x23a200
> >>
> >> After patch:
> >>
> >> [ 94.290793] Injecting memory failure at pfn 23a000
> >> [ 94.290800] MCE 0x23a000: huge page recovery: Delayed
> >> [ 105.722303] MCE: Software-unpoisoned page 0x23a000
> >>
> >> Signed-off-by: Wanpeng Li <liwanp@linux.vnet.ibm.com>
> >> ---
> >> mm/memory-failure.c | 2 +-
> >> 1 file changed, 1 insertion(+), 1 deletion(-)
> >>
> >> diff --git a/mm/memory-failure.c b/mm/memory-failure.c
> >> index e28ee77..b114570 100644
> >> --- a/mm/memory-failure.c
> >> +++ b/mm/memory-failure.c
> >> @@ -1349,7 +1349,7 @@ int unpoison_memory(unsigned long pfn)
> >> * worked by memory_failure() and the page lock is not held yet.
> >> * In such case, we yield to memory_failure() and make unpoison fail.
> >> */
> >> - if (PageTransHuge(page)) {
> >> + if (!PageHuge(page) && PageTransHuge(page)) {
> >> pr_info("MCE: Memory failure is now running on %#lx\n", pfn);
> >> return 0;
> >> }
> >
> >Not sure which git tree should be used to apply this patch series? I assume
> >this patch series follows this link: https://lkml.org/lkml/2013/8/26/76.
> >
>
> mmotm tree or linux-next. ;-)
>
> >In unpoison_memory we already have
> > if (PageHuge(page)) {
> > ...
> > return 0;
> > }
> >so it looks like this patch is redundant.
>
> - Do you aware there is condition before go to this check?
> - Do you also analysis why the check can't catch the hugetlbfs page
> through the dump information?
>
Looks like we use different trees. After checking your working tree,
your patch is right. So just ignore my words above. FWIW, please be
polite and give a positive response.
> Regards,
> Wanpeng Li
>
> --
> 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>
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH v2 2/4] mm/hwpoison: fix miss catch transparent huge page
2013-09-03 8:04 ` Chen Gong
2013-09-03 8:21 ` Wanpeng Li
@ 2013-09-03 8:21 ` Wanpeng Li
1 sibling, 0 replies; 13+ messages in thread
From: Wanpeng Li @ 2013-09-03 8:21 UTC (permalink / raw)
To: Chen Gong
Cc: Andrew Morton, Andi Kleen, Fengguang Wu, Naoya Horiguchi,
Tony Luck, linux-mm, linux-kernel
On Tue, Sep 03, 2013 at 04:04:25AM -0400, Chen Gong wrote:
>On Tue, Sep 03, 2013 at 12:18:58PM +0800, Wanpeng Li wrote:
>> Date: Tue, 3 Sep 2013 12:18:58 +0800
>> From: Wanpeng Li <liwanp@linux.vnet.ibm.com>
>> To: Chen Gong <gong.chen@linux.intel.com>
>> Cc: Andrew Morton <akpm@linux-foundation.org>, Andi Kleen
>> <andi@firstfloor.org>, Fengguang Wu <fengguang.wu@intel.com>, Naoya
>> Horiguchi <n-horiguchi@ah.jp.nec.com>, Tony Luck <tony.luck@intel.com>,
>> linux-mm@kvack.org, linux-kernel@vger.kernel.org
>> Subject: Re: [PATCH v2 2/4] mm/hwpoison: fix miss catch transparent huge
>> page
>> User-Agent: Mutt/1.5.21 (2010-09-15)
>>
>> On Mon, Sep 02, 2013 at 11:15:19PM -0400, Chen Gong wrote:
>> >On Tue, Sep 03, 2013 at 07:36:44AM +0800, Wanpeng Li wrote:
>> >> Date: Tue, 3 Sep 2013 07:36:44 +0800
>> >> From: Wanpeng Li <liwanp@linux.vnet.ibm.com>
>> >> To: Andrew Morton <akpm@linux-foundation.org>
>> >> Cc: Andi Kleen <andi@firstfloor.org>, Fengguang Wu
>> >> <fengguang.wu@intel.com>, Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>,
>> >> Tony Luck <tony.luck@intel.com>, gong.chen@linux.intel.com,
>> >> linux-mm@kvack.org, linux-kernel@vger.kernel.org, Wanpeng Li
>> >> <liwanp@linux.vnet.ibm.com>
>> >> Subject: [PATCH v2 2/4] mm/hwpoison: fix miss catch transparent huge page
>> >> X-Mailer: git-send-email 1.7.5.4
>> >>
>> >> Changelog:
>> >> *v1 -> v2: reverse PageTransHuge(page) && !PageHuge(page) check
>> >>
>> >> PageTransHuge() can't guarantee the page is transparent huge page since it
>> >> return true for both transparent huge and hugetlbfs pages. This patch fix
>> >> it by check the page is also !hugetlbfs page.
>> >>
>> >> Before patch:
>> >>
>> >> [ 121.571128] Injecting memory failure at pfn 23a200
>> >> [ 121.571141] MCE 0x23a200: huge page recovery: Delayed
>> >> [ 140.355100] MCE: Memory failure is now running on 0x23a200
>> >>
>> >> After patch:
>> >>
>> >> [ 94.290793] Injecting memory failure at pfn 23a000
>> >> [ 94.290800] MCE 0x23a000: huge page recovery: Delayed
>> >> [ 105.722303] MCE: Software-unpoisoned page 0x23a000
>> >>
>> >> Signed-off-by: Wanpeng Li <liwanp@linux.vnet.ibm.com>
>> >> ---
>> >> mm/memory-failure.c | 2 +-
>> >> 1 file changed, 1 insertion(+), 1 deletion(-)
>> >>
>> >> diff --git a/mm/memory-failure.c b/mm/memory-failure.c
>> >> index e28ee77..b114570 100644
>> >> --- a/mm/memory-failure.c
>> >> +++ b/mm/memory-failure.c
>> >> @@ -1349,7 +1349,7 @@ int unpoison_memory(unsigned long pfn)
>> >> * worked by memory_failure() and the page lock is not held yet.
>> >> * In such case, we yield to memory_failure() and make unpoison fail.
>> >> */
>> >> - if (PageTransHuge(page)) {
>> >> + if (!PageHuge(page) && PageTransHuge(page)) {
>> >> pr_info("MCE: Memory failure is now running on %#lx\n", pfn);
>> >> return 0;
>> >> }
>> >
>> >Not sure which git tree should be used to apply this patch series? I assume
>> >this patch series follows this link: https://lkml.org/lkml/2013/8/26/76.
>> >
>>
>> mmotm tree or linux-next. ;-)
>>
>> >In unpoison_memory we already have
>> > if (PageHuge(page)) {
>> > ...
>> > return 0;
>> > }
>> >so it looks like this patch is redundant.
>>
>> - Do you aware there is condition before go to this check?
>> - Do you also analysis why the check can't catch the hugetlbfs page
>> through the dump information?
>>
>
>Looks like we use different trees. After checking your working tree,
>your patch is right. So just ignore my words above. FWIW, please be
Thanks.
>polite and give a positive response.
>
It's my fault, sorry for that.
Regards,
Wanpeng Li
>> Regards,
>> Wanpeng Li
>>
>> --
>> 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>
--
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>
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH v2 2/4] mm/hwpoison: fix miss catch transparent huge page
2013-09-03 8:04 ` Chen Gong
@ 2013-09-03 8:21 ` Wanpeng Li
2013-09-03 8:21 ` Wanpeng Li
1 sibling, 0 replies; 13+ messages in thread
From: Wanpeng Li @ 2013-09-03 8:21 UTC (permalink / raw)
To: Chen Gong
Cc: Andrew Morton, Andi Kleen, Fengguang Wu, Naoya Horiguchi,
Tony Luck, linux-mm, linux-kernel
On Tue, Sep 03, 2013 at 04:04:25AM -0400, Chen Gong wrote:
>On Tue, Sep 03, 2013 at 12:18:58PM +0800, Wanpeng Li wrote:
>> Date: Tue, 3 Sep 2013 12:18:58 +0800
>> From: Wanpeng Li <liwanp@linux.vnet.ibm.com>
>> To: Chen Gong <gong.chen@linux.intel.com>
>> Cc: Andrew Morton <akpm@linux-foundation.org>, Andi Kleen
>> <andi@firstfloor.org>, Fengguang Wu <fengguang.wu@intel.com>, Naoya
>> Horiguchi <n-horiguchi@ah.jp.nec.com>, Tony Luck <tony.luck@intel.com>,
>> linux-mm@kvack.org, linux-kernel@vger.kernel.org
>> Subject: Re: [PATCH v2 2/4] mm/hwpoison: fix miss catch transparent huge
>> page
>> User-Agent: Mutt/1.5.21 (2010-09-15)
>>
>> On Mon, Sep 02, 2013 at 11:15:19PM -0400, Chen Gong wrote:
>> >On Tue, Sep 03, 2013 at 07:36:44AM +0800, Wanpeng Li wrote:
>> >> Date: Tue, 3 Sep 2013 07:36:44 +0800
>> >> From: Wanpeng Li <liwanp@linux.vnet.ibm.com>
>> >> To: Andrew Morton <akpm@linux-foundation.org>
>> >> Cc: Andi Kleen <andi@firstfloor.org>, Fengguang Wu
>> >> <fengguang.wu@intel.com>, Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>,
>> >> Tony Luck <tony.luck@intel.com>, gong.chen@linux.intel.com,
>> >> linux-mm@kvack.org, linux-kernel@vger.kernel.org, Wanpeng Li
>> >> <liwanp@linux.vnet.ibm.com>
>> >> Subject: [PATCH v2 2/4] mm/hwpoison: fix miss catch transparent huge page
>> >> X-Mailer: git-send-email 1.7.5.4
>> >>
>> >> Changelog:
>> >> *v1 -> v2: reverse PageTransHuge(page) && !PageHuge(page) check
>> >>
>> >> PageTransHuge() can't guarantee the page is transparent huge page since it
>> >> return true for both transparent huge and hugetlbfs pages. This patch fix
>> >> it by check the page is also !hugetlbfs page.
>> >>
>> >> Before patch:
>> >>
>> >> [ 121.571128] Injecting memory failure at pfn 23a200
>> >> [ 121.571141] MCE 0x23a200: huge page recovery: Delayed
>> >> [ 140.355100] MCE: Memory failure is now running on 0x23a200
>> >>
>> >> After patch:
>> >>
>> >> [ 94.290793] Injecting memory failure at pfn 23a000
>> >> [ 94.290800] MCE 0x23a000: huge page recovery: Delayed
>> >> [ 105.722303] MCE: Software-unpoisoned page 0x23a000
>> >>
>> >> Signed-off-by: Wanpeng Li <liwanp@linux.vnet.ibm.com>
>> >> ---
>> >> mm/memory-failure.c | 2 +-
>> >> 1 file changed, 1 insertion(+), 1 deletion(-)
>> >>
>> >> diff --git a/mm/memory-failure.c b/mm/memory-failure.c
>> >> index e28ee77..b114570 100644
>> >> --- a/mm/memory-failure.c
>> >> +++ b/mm/memory-failure.c
>> >> @@ -1349,7 +1349,7 @@ int unpoison_memory(unsigned long pfn)
>> >> * worked by memory_failure() and the page lock is not held yet.
>> >> * In such case, we yield to memory_failure() and make unpoison fail.
>> >> */
>> >> - if (PageTransHuge(page)) {
>> >> + if (!PageHuge(page) && PageTransHuge(page)) {
>> >> pr_info("MCE: Memory failure is now running on %#lx\n", pfn);
>> >> return 0;
>> >> }
>> >
>> >Not sure which git tree should be used to apply this patch series? I assume
>> >this patch series follows this link: https://lkml.org/lkml/2013/8/26/76.
>> >
>>
>> mmotm tree or linux-next. ;-)
>>
>> >In unpoison_memory we already have
>> > if (PageHuge(page)) {
>> > ...
>> > return 0;
>> > }
>> >so it looks like this patch is redundant.
>>
>> - Do you aware there is condition before go to this check?
>> - Do you also analysis why the check can't catch the hugetlbfs page
>> through the dump information?
>>
>
>Looks like we use different trees. After checking your working tree,
>your patch is right. So just ignore my words above. FWIW, please be
Thanks.
>polite and give a positive response.
>
It's my fault, sorry for that.
Regards,
Wanpeng Li
>> Regards,
>> Wanpeng Li
>>
>> --
>> 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>
--
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>
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2013-09-03 8:22 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-02 23:36 [PATCH v2 1/4] mm/hwpoison: fix traverse hugetlbfs page to avoid printk flood Wanpeng Li
2013-09-02 23:36 ` [PATCH v2 2/4] mm/hwpoison: fix miss catch transparent huge page Wanpeng Li
2013-09-03 0:20 ` Naoya Horiguchi
2013-09-03 3:15 ` Chen Gong
2013-09-03 4:18 ` Wanpeng Li
2013-09-03 7:59 ` Wanpeng Li
2013-09-03 7:59 ` Wanpeng Li
2013-09-03 4:18 ` Wanpeng Li
[not found] ` <52256342.4ad52a0a.2e24.ffff8c60SMTPIN_ADDED_BROKEN@mx.google.com>
2013-09-03 8:04 ` Chen Gong
2013-09-03 8:21 ` Wanpeng Li
2013-09-03 8:21 ` Wanpeng Li
2013-09-02 23:36 ` [PATCH v2 3/4] mm/hwpoison: fix false report 2nd try page recovery Wanpeng Li
2013-09-02 23:36 ` [PATCH v2 4/4] mm/hwpoison: fix the lack of one reference count against poisoned page Wanpeng Li
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).