From: "裘稀石(稀石)" <xishi.qiuxishi@alibaba-inc.com>
To: Horiguchi Naoya <nao.horiguchi@gmail.com>, linux-mm <linux-mm@kvack.org>
Cc: "Michal Hocko" <mhocko@kernel.org>,
"Andrew Morton" <akpm@linux-foundation.org>,
陈义全 <zy.zhengyi@alibaba-inc.com>,
linux-kernel <linux-kernel@vger.kernel.org>
Subject: 回复:[PATCH v1 1/2] mm: fix race on soft-offlining free huge pages
Date: Fri, 13 Jul 2018 13:23:07 +0800 [thread overview]
Message-ID: <81f12bd3-d7bf-42a0-a0c5-ead475f489ad.xishi.qiuxishi@alibaba-inc.com> (raw)
In-Reply-To: <1531452366-11661-2-git-send-email-n-horiguchi@ah.jp.nec.com>
[-- Attachment #1: Type: text/plain, Size: 1283 bytes --]
Hi Naoya,
Shall we change the return value in soft_offline_free_page()?
If we still return void in offline free pages no matter it success
or fail later. echo xxx > soft_offline_pages, return 0, success,
but the number of "cat /proc/meminfo | grep HardwareCorrupted"
is not increased, this makes confusion for users.
Thanks,
Xishi Qiu
...
static void soft_offline_free_page(struct page *page) {
+ int rc = 0;
struct page *head = compound_head(page);
- if (!TestSetPageHWPoison(head)) {
+ if (PageHuge(head))
+ rc = dissolve_free_huge_page(page);
+ if (!rc && !TestSetPageHWPoison(page))
num_poisoned_pages_inc();
- if (PageHuge(head))
- dissolve_free_huge_page(page);
- }
}
/**
diff --git v4.18-rc4-mmotm-2018-07-10-16-50/mm/migrate.c v4.18-rc4-mmotm-2018-07-10-16-50_patched/mm/migrate.c
index 198af42..3ae213b 100644
--- v4.18-rc4-mmotm-2018-07-10-16-50/mm/migrate.c
+++ v4.18-rc4-mmotm-2018-07-10-16-50_patched/mm/migrate.c
@@ -1318,8 +1318,6 @@ static int unmap_and_move_huge_page(new_page_t get_new_page,
out:
if (rc != -EAGAIN)
putback_active_hugepage(hpage);
- if (reason == MR_MEMORY_FAILURE && !test_set_page_hwpoison(hpage))
- num_poisoned_pages_inc();
/*
* If migration was not successful and there's a freeing callback, use
--
2.7.0
[-- Attachment #2: Type: text/html, Size: 4922 bytes --]
next prev parent reply other threads:[~2018-07-13 5:23 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-13 3:26 [PATCH v1 0/2] mm: soft-offline: fix race against page allocation Naoya Horiguchi
2018-07-13 3:26 ` [PATCH v1 1/2] mm: fix race on soft-offlining free huge pages Naoya Horiguchi
2018-07-13 5:23 ` 裘稀石(稀石) [this message]
2018-07-13 5:28 ` 回复:[PATCH " 裘稀石(稀石)
2018-07-13 20:35 ` [PATCH " Andrew Morton
2018-07-17 0:25 ` Naoya Horiguchi
2018-07-13 3:26 ` [PATCH v1 2/2] mm: soft-offline: close the race against page allocation Naoya Horiguchi
2018-07-13 20:40 ` Andrew Morton
2018-07-17 0:27 ` 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=81f12bd3-d7bf-42a0-a0c5-ead475f489ad.xishi.qiuxishi@alibaba-inc.com \
--to=xishi.qiuxishi@alibaba-inc.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@kernel.org \
--cc=nao.horiguchi@gmail.com \
--cc=zy.zhengyi@alibaba-inc.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