[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-id: <000001cffe2a$66a95a50$33fc0ef0$%yang@samsung.com>
Date: Wed, 12 Nov 2014 11:39:29 +0800
From: Weijie Yang <weijie.yang@...sung.com>
To: 'Johannes Weiner' <hannes@...xchg.org>
Cc: 'Andrew Morton' <akpm@...ux-foundation.org>, mgorman@...e.de,
'Rik van Riel' <riel@...hat.com>,
'Weijie Yang' <weijie.yang.kh@...il.com>,
'Linux-MM' <linux-mm@...ck.org>,
'linux-kernel' <linux-kernel@...r.kernel.org>
Subject: [PATCH] mm: mincore: add hwpoison page handle
When encounter pte is a swap entry, the current code handles two cases:
migration and normal swapentry, but we have a third case: hwpoison page.
This patch adds hwpoison page handle, consider hwpoison page incore as
same as migration.
Signed-off-by: Weijie Yang <weijie.yang@...sung.com>
---
mm/mincore.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/mm/mincore.c b/mm/mincore.c
index 725c809..3545f13 100644
--- a/mm/mincore.c
+++ b/mm/mincore.c
@@ -137,8 +137,8 @@ static void mincore_pte_range(struct vm_area_struct *vma, pmd_t *pmd,
} else { /* pte is a swap entry */
swp_entry_t entry = pte_to_swp_entry(pte);
- if (is_migration_entry(entry)) {
- /* migration entries are always uptodate */
+ if (non_swap_entry(entry)) {
+ /* migration or hwpoison entries are always uptodate */
*vec = 1;
} else {
#ifdef CONFIG_SWAP
--
1.7.0.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists