lkml.org 
[lkml]   [2022]   [Jun]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v2 5/9] mm, hwpoison: make unpoison aware of raw error info in hwpoisoned hugepage
From
Date
On 2022/6/27 16:32, Miaohe Lin wrote:
> On 2022/6/24 7:51, Naoya Horiguchi wrote:
>> From: Naoya Horiguchi <naoya.horiguchi@nec.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@nec.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);
>> }
>>
>

\
 
 \ /
  Last update: 2022-06-27 14:01    [W:0.091 / U:0.164 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site