From: Jin Dongming <jin.dongming@np.css.fujitsu.com>
To: Andi Kleen <andi@firstfloor.org>
Cc: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>,
Huang Ying <ying.huang@intel.com>,
Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>,
LKLM <linux-kernel@vger.kernel.org>
Subject: [PATCH 2/3] Fix poison failure for unmapped hugetlb page without MF_COUNT_INCREASED.
Date: Fri, 21 Jan 2011 10:24:06 +0900 [thread overview]
Message-ID: <4D38E036.2020102@np.css.fujitsu.com> (raw)
The unmapped hugetlb page could not be poisoned when the tail
page is poisoned.
The reason is because the PG_hwpoison of head page is checked
before setting PG_hwpoison on other pages of the hugetlb page.
Usually the head page here is not poisoned yet, so __memory_failure()
will return without poisoning the rest pages of hugetlb page.
If the head page is poisoned, poisoning for the hugetlb page
has been finished by other context running simultaneously.
As it is described in the comment(in __memory_failure()):
994 /*
995 * Check "just unpoisoned", "filter hit", and
996 * "race with other subpage."
997 */
I think the real checking expected here is "just unpoisoned",
whether the tail page just poisoned by this context is still
poisoned or not. It should be realized by checking against
the poisoned tail page, not against the head page.
Signed-off-by: Jin Dongming <jin.dongming@np.css.fujitsu.com>
Reviewed-by: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
---
mm/memory-failure.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/mm/memory-failure.c b/mm/memory-failure.c
index 8665eed..824850a 100644
--- a/mm/memory-failure.c
+++ b/mm/memory-failure.c
@@ -996,7 +996,7 @@ int __memory_failure(unsigned long pfn, int trapno, int flags)
* "race with other subpage."
*/
lock_page_nosync(hpage);
- if (!PageHWPoison(hpage)
+ if (!PageHWPoison(p)
|| (hwpoison_filter(p) && TestClearPageHWPoison(p))
|| (p != hpage && TestSetPageHWPoison(hpage))) {
atomic_long_sub(nr_pages, &mce_bad_pages);
--
1.7.2.2
reply other threads:[~2011-01-21 1:20 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=4D38E036.2020102@np.css.fujitsu.com \
--to=jin.dongming@np.css.fujitsu.com \
--cc=andi@firstfloor.org \
--cc=linux-kernel@vger.kernel.org \
--cc=n-horiguchi@ah.jp.nec.com \
--cc=seto.hidetoshi@jp.fujitsu.com \
--cc=ying.huang@intel.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