From: Oscar Salvador <osalvador@suse.de>
To: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
Cc: linux-mm@kvack.org, Andrew Morton <akpm@linux-foundation.org>,
Michal Hocko <mhocko@kernel.org>,
Mike Kravetz <mike.kravetz@oracle.com>,
xishi.qiuxishi@alibaba-inc.com, "Chen,
Jerry T" <jerry.t.chen@intel.com>,
"Zhuo, Qiuxu" <qiuxu.zhuo@intel.com>,
linux-kernel@vger.kernel.org,
Anshuman Khandual <anshuman.khandual@arm.com>
Subject: Re: [PATCH v3 1/2] mm: soft-offline: return -EBUSY if set_hwpoison_free_buddy_page() fails
Date: Tue, 18 Jun 2019 16:57:52 +0200 [thread overview]
Message-ID: <20190618145748.GA14817@linux> (raw)
In-Reply-To: <1560761476-4651-2-git-send-email-n-horiguchi@ah.jp.nec.com>
On Mon, Jun 17, 2019 at 05:51:15PM +0900, Naoya Horiguchi wrote:
> The pass/fail of soft offline should be judged by checking whether the
> raw error page was finally contained or not (i.e. the result of
> set_hwpoison_free_buddy_page()), but current code do not work like that.
> So this patch is suggesting to fix it.
>
> Without this fix, there are cases where madvise(MADV_SOFT_OFFLINE) may
> not offline the original page and will not return an error. It might
> lead us to misjudge the test result when set_hwpoison_free_buddy_page()
> actually fails.
>
> Signed-off-by: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
> Fixes: 6bc9b56433b76 ("mm: fix race on soft-offlining")
> Cc: <stable@vger.kernel.org> # v4.19+
Reviewed-by: Oscar Salvador <osalvador@suse.de>
> ---
> ChangeLog v2->v3:
> - update patch description to clarify user visible change
> ---
> mm/memory-failure.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git v5.2-rc4/mm/memory-failure.c v5.2-rc4_patched/mm/memory-failure.c
> index 8da0334..8ee7b16 100644
> --- v5.2-rc4/mm/memory-failure.c
> +++ v5.2-rc4_patched/mm/memory-failure.c
> @@ -1730,6 +1730,8 @@ static int soft_offline_huge_page(struct page *page, int flags)
> if (!ret) {
> if (set_hwpoison_free_buddy_page(page))
> num_poisoned_pages_inc();
> + else
> + ret = -EBUSY;
> }
> }
> return ret;
> --
> 2.7.0
>
--
Oscar Salvador
SUSE L3
next prev parent reply other threads:[~2019-06-18 14:57 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-17 8:51 [PATCH v3 0/2] fix return value issue of soft offlining hugepages Naoya Horiguchi
2019-06-17 8:51 ` [PATCH v3 1/2] mm: soft-offline: return -EBUSY if set_hwpoison_free_buddy_page() fails Naoya Horiguchi
2019-06-18 14:57 ` Oscar Salvador [this message]
2019-06-18 17:33 ` Mike Kravetz
2019-06-17 8:51 ` [PATCH v3 2/2] mm: hugetlb: soft-offline: dissolve_free_huge_page() return zero on !PageHuge Naoya Horiguchi
2019-06-18 16:11 ` Oscar Salvador
2019-06-18 17:55 ` Mike Kravetz
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=20190618145748.GA14817@linux \
--to=osalvador@suse.de \
--cc=akpm@linux-foundation.org \
--cc=anshuman.khandual@arm.com \
--cc=jerry.t.chen@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@kernel.org \
--cc=mike.kravetz@oracle.com \
--cc=n-horiguchi@ah.jp.nec.com \
--cc=qiuxu.zhuo@intel.com \
--cc=xishi.qiuxishi@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