[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220530050929.GA1041165@hori.linux.bs1.fc.nec.co.jp>
Date: Mon, 30 May 2022 05:09:30 +0000
From: HORIGUCHI NAOYA(堀口 直也)
<naoya.horiguchi@....com>
To: zhenwei pi <pizhenwei@...edance.com>
CC: "akpm@...ux-foundation.org" <akpm@...ux-foundation.org>,
"mst@...hat.com" <mst@...hat.com>,
"david@...hat.com" <david@...hat.com>,
"linux-mm@...ck.org" <linux-mm@...ck.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"jasowang@...hat.com" <jasowang@...hat.com>,
"virtualization@...ts.linux-foundation.org"
<virtualization@...ts.linux-foundation.org>,
"pbonzini@...hat.com" <pbonzini@...hat.com>,
"peterx@...hat.com" <peterx@...hat.com>,
"qemu-devel@...gnu.org" <qemu-devel@...gnu.org>
Subject: Re: [PATCH 1/3] memory-failure: Introduce memory failure notifier
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@...edance.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
Powered by blists - more mailing lists