[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2b6a6b19-c930-6d27-5929-363802e42596@huawei.com>
Date: Mon, 27 Jun 2022 19:48:46 +0800
From: Miaohe Lin <linmiaohe@...wei.com>
To: Naoya Horiguchi <nao.horiguchi@...il.com>, <linux-mm@...ck.org>
CC: Andrew Morton <akpm@...ux-foundation.org>,
David Hildenbrand <david@...hat.com>,
Mike Kravetz <mike.kravetz@...cle.com>,
Liu Shixin <liushixin2@...wei.com>,
Yang Shi <shy828301@...il.com>,
Oscar Salvador <osalvador@...e.de>,
Muchun Song <songmuchun@...edance.com>,
Naoya Horiguchi <naoya.horiguchi@....com>,
<linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2 5/9] mm, hwpoison: make unpoison aware of raw error
info in hwpoisoned hugepage
On 2022/6/27 16:32, Miaohe Lin wrote:
> On 2022/6/24 7:51, Naoya Horiguchi wrote:
>> From: Naoya Horiguchi <naoya.horiguchi@....com>
>>
>> Raw error info list needs to be removed when hwpoisoned hugetlb is
>> unpoisioned. And unpoison handler needs to know how many errors there
>> are in the target hugepage. So add them.
>>
>> Signed-off-by: Naoya Horiguchi <naoya.horiguchi@....com>
>
> snip
>
>> @@ -2255,7 +2275,7 @@ int unpoison_memory(unsigned long pfn)
>> unlock_mutex:
>> mutex_unlock(&mf_mutex);
>> if (!ret || freeit) {
>> - num_poisoned_pages_dec();
>> + num_poisoned_pages_sub(count);
>
> IIUC, num_poisoned_pages will only be incremented once for hugetlb page. If many
> subpages are hwpoisoned, they will reach the "else if (res == -EHWPOISON)" path
> in try_memory_failure_hugetlb and thus num_poisoned_pages_inc is ignored. Maybe
> that should be changed so subpages can contribute to the num_poisoned_pages
> or should we just do num_poisoned_pages_dec here? Or am I miss something?
Sorry. I re-read patch 4/9 and I found hugetlb_set_page_hwpoison will increment the
num_poisoned_pages for each subpages. Please ignore this question.
>
> Thanks!
>
>> unpoison_pr_info("Unpoison: Software-unpoisoned page %#lx\n",
>> page_to_pfn(p), &unpoison_rs);
>> }
>>
>
Powered by blists - more mailing lists