From: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
To: Wang Xiaoqiang <wangxq10@lzu.edu.cn>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-mm@kvack.org" <linux-mm@kvack.org>
Subject: Re: [PATCH] memory_failure: remove redundant check for the PG_HWPoison flag of 'hpage'
Date: Fri, 31 Jul 2015 08:12:19 +0000 [thread overview]
Message-ID: <20150731081218.GA14902@hori1.linux.bs1.fc.nec.co.jp> (raw)
In-Reply-To: <20150730105246.6bcc0af5@hp>
On Thu, Jul 30, 2015 at 10:52:46AM +0800, Wang Xiaoqiang wrote:
...
> In your example, the 100th subage enter the memory
> error handler firstly, and then it uses the
> set_page_hwpoison_huge_page to set all subpages
> with PG_HWPoison flag, the 50th page handler waits
> for grab the lock_page(hpage) now.
>
> When the 100th page handler unlock the 'hpage',
> the 50th grab it, and now the 'hapge' has been
> set with PG_HWPosison. So PageHWPoison micro
> will return true, and the following code will
> be executed:
>
> if (PageHWPoison(hpage)) {
> if ((hwpoison_filter(p) && TestClearPageHWPoison(p))
> || (p != hpage && TestSetPageHWPoison(hpage))) {
> atomic_long_sub(nr_pages, &num_poisoned_pages);
> unlock_page(hpage);
> return 0;
> }
> }
>
> Now 'p' is 50th subpage, it doesn't equal the
> 'hpage' obviously, so if we don't have TestSetPageHWPoison
> here, it still will ignore the 50th error.
Ah, you're right, thanks for the explanation, Xiaoqiang!
Acked-by: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
--
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>
prev parent reply other threads:[~2015-07-31 8:13 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20150729155246.2fed1b96@hp>
2015-07-29 9:17 ` Naoya Horiguchi
2015-07-30 2:52 ` Wang Xiaoqiang
2015-07-31 8:12 ` Naoya Horiguchi [this message]
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=20150731081218.GA14902@hori1.linux.bs1.fc.nec.co.jp \
--to=n-horiguchi@ah.jp.nec.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=wangxq10@lzu.edu.cn \
/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