From: "HORIGUCHI NAOYA(堀口 直也)" <naoya.horiguchi@nec.com>
To: Miaohe Lin <linmiaohe@huawei.com>
Cc: Naoya Horiguchi <naoya.horiguchi@linux.dev>,
"linux-mm@kvack.org" <linux-mm@kvack.org>,
Andrew Morton <akpm@linux-foundation.org>,
David Hildenbrand <david@redhat.com>,
Mike Kravetz <mike.kravetz@oracle.com>,
Yang Shi <shy828301@gmail.com>,
Oscar Salvador <osalvador@suse.de>,
Muchun Song <songmuchun@bytedance.com>,
Jane Chu <jane.chu@oracle.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v3 1/4] mm,hwpoison,hugetlb,memory_hotplug: hotremove memory section with hwpoisoned hugepage
Date: Fri, 7 Oct 2022 00:45:23 +0000 [thread overview]
Message-ID: <20221007004501.GA3227576@hori.linux.bs1.fc.nec.co.jp> (raw)
In-Reply-To: <e75128b5-ea83-48b4-8371-d146ed391f86@huawei.com>
On Wed, Sep 28, 2022 at 05:32:12PM +0800, Miaohe Lin wrote:
> On 2022/9/28 9:26, Naoya Horiguchi wrote:
> >>> @@ -1815,6 +1815,13 @@ int __get_huge_page_for_hwpoison(unsigned long pfn, int flags)
...
> >>> @@ -1862,6 +1869,7 @@ static int try_memory_failure_hugetlb(unsigned long pfn, int flags, int *hugetlb
> >>>
> >>> if (hwpoison_filter(p)) {
> >>> hugetlb_clear_page_hwpoison(head);
> >>> + SetHPageMigratable(head);
> >>
> >> Would we set HPageMigratable flag for free hugetlb pages here? IIUC, they're not expected to have this flag set.
> >
> > Thank you, you're right. This should be done in "if (res == 1)" block.
>
> If res == 1, it means hugetlb page refcnt is incremented. But it seems this does not necessarily mean
> HPageMigratable is cleared by __get_huge_page_for_hwpoison() if the hugetlb page is already isolated.
> If so, we might set HPageMigratable flag back for already isolated hugetlb pages?
# sorry for my late reply, I was busy with personal matters these days...
Yes, that could happen (and also in the case where MF_COUNT_INCREASED is
set). We need store whether HPageMigratable flag is cleared or not in
__get_huge_page_for_hwpoison(). I'll add a parameter to
__get_huge_page_for_hwpoison() to return the flag change to the caller.
But I also think that there're a few internal states during error handling,
so it might be good to add some structure like "struct hwpoison_control"
to save such internal states over related functions (not in this series).
Thanks,
Naoya Horiguchi
next prev parent reply other threads:[~2022-10-07 0:45 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-21 9:13 [PATCH v3 0/4] mm, hwpoison: improve handling workload related to hugetlb and memory_hotplug Naoya Horiguchi
2022-09-21 9:13 ` [PATCH v3 1/4] mm,hwpoison,hugetlb,memory_hotplug: hotremove memory section with hwpoisoned hugepage Naoya Horiguchi
2022-09-24 11:43 ` Miaohe Lin
2022-09-28 1:26 ` Naoya Horiguchi
2022-09-28 9:32 ` Miaohe Lin
2022-10-07 0:45 ` HORIGUCHI NAOYA(堀口 直也) [this message]
2022-10-08 2:33 ` Miaohe Lin
2022-09-21 9:13 ` [PATCH v3 2/4] mm/hwpoison: move definitions of num_poisoned_pages_* to memory-failure.c Naoya Horiguchi
2022-09-24 11:53 ` Miaohe Lin
2022-09-28 2:05 ` Naoya Horiguchi
2022-09-28 7:56 ` Miaohe Lin
2022-09-21 9:13 ` [PATCH v3 3/4] mm/hwpoison: pass pfn to num_poisoned_pages_*() Naoya Horiguchi
2022-09-21 9:13 ` [PATCH v3 4/4] mm/hwpoison: introduce per-memory_block hwpoison counter Naoya Horiguchi
2022-09-23 8:26 ` [PATCH v4 4/4] mm/hwpoison: introduce per-memory_block hwpoison counter counter Naoya Horiguchi
2022-09-23 14:12 ` [PATCH v5 " Naoya Horiguchi
2022-09-24 12:27 ` Miaohe Lin
2022-10-07 0:47 ` HORIGUCHI NAOYA(堀口 直也)
2022-09-26 8:05 ` David Hildenbrand
2022-10-07 0:52 ` HORIGUCHI NAOYA(堀口 直也)
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=20221007004501.GA3227576@hori.linux.bs1.fc.nec.co.jp \
--to=naoya.horiguchi@nec.com \
--cc=akpm@linux-foundation.org \
--cc=david@redhat.com \
--cc=jane.chu@oracle.com \
--cc=linmiaohe@huawei.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mike.kravetz@oracle.com \
--cc=naoya.horiguchi@linux.dev \
--cc=osalvador@suse.de \
--cc=shy828301@gmail.com \
--cc=songmuchun@bytedance.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