qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 1/3] memory-failure: Introduce memory failure notifier


From: 堀口 直也
Subject: Re: [PATCH 1/3] memory-failure: Introduce memory failure notifier
Date: Mon, 30 May 2022 05:09:30 +0000

On Fri, May 20, 2022 at 03:06:46PM +0800, zhenwei pi wrote:
> Introduce memory failure notifier, once hardware memory failure
> occurs, after the kernel handles the corrupted page successfully,
> someone who registered this chain gets noticed of the corrupted PFN.
> 
> Signed-off-by: zhenwei pi <pizhenwei@bytedance.com>

...
> @@ -1136,6 +1165,10 @@ static void action_result(unsigned long pfn, enum 
> mf_action_page_type type,
>       num_poisoned_pages_inc();
>       pr_err("Memory failure: %#lx: recovery action for %s: %s\n",
>               pfn, action_page_types[type], action_name[result]);
> +
> +     /* notify the chain if we handle successfully only */

This comment looks somewhat obvious from the code, maybe it's greater
to comment about "why" or the intention.

Thanks,
Naoya Horiguchi

> +     if (result == MF_RECOVERED)
> +             blocking_notifier_call_chain(&mf_notifier_list, pfn, NULL);
>  }
>  
>  static int page_action(struct page_state *ps, struct page *p,
> -- 
> 2.20.1

reply via email to

[Prev in Thread] Current Thread [Next in Thread]