mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Weijie Yang <weijie.yang@samsung.com>
To: "'Johannes Weiner'" <hannes@cmpxchg.org>
Cc: "'Andrew Morton'" <akpm@linux-foundation.org>,
	mgorman@suse.de, "'Rik van Riel'" <riel@redhat.com>,
	"'Weijie Yang'" <weijie.yang.kh@gmail.com>,
	"'Linux-MM'" <linux-mm@kvack.org>,
	"'linux-kernel'" <linux-kernel@vger.kernel.org>
Subject: [PATCH] mm: mincore: add hwpoison page handle
Date: Wed, 12 Nov 2014 11:39:29 +0800	[thread overview]
Message-ID: <000001cffe2a$66a95a50$33fc0ef0$%yang@samsung.com> (raw)

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@samsung.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



             reply	other threads:[~2014-11-12  3:40 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-12  3:39 Weijie Yang [this message]
2014-11-12 14:20 ` Johannes Weiner
2014-11-14  1:02   ` Naoya Horiguchi

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='000001cffe2a$66a95a50$33fc0ef0$%yang@samsung.com' \
    --to=weijie.yang@samsung.com \
    --cc=akpm@linux-foundation.org \
    --cc=hannes@cmpxchg.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mgorman@suse.de \
    --cc=riel@redhat.com \
    --cc=weijie.yang.kh@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®