linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: David Hildenbrand <david@redhat.com>
To: "HORIGUCHI NAOYA(堀口 直也)" <naoya.horiguchi@nec.com>,
	"zhenwei pi" <pizhenwei@bytedance.com>
Cc: "akpm@linux-foundation.org" <akpm@linux-foundation.org>,
	"linux-mm@kvack.org" <linux-mm@kvack.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linmiaohe@huawei.com" <linmiaohe@huawei.com>
Subject: Re: [PATCH v4 1/2] mm/memory-failure: introduce "hwpoisoned-pages" entry
Date: Tue, 14 Jun 2022 09:13:16 +0200	[thread overview]
Message-ID: <66c43dac-32ac-5801-c76c-01607d68e38b@redhat.com> (raw)
In-Reply-To: <20220614070934.GA1627546@hori.linux.bs1.fc.nec.co.jp>

	   &hwpoisoned_pages);
> 
> I'm not sure how useful this interface from userspace (controlling test process
> with this?).  Do we really need to expose this to userspace? 
> 
> 
> TBH I feel that another approach like below is more desirable:
> 
>   - define a new flag in "enum mf_flags" (for example named MF_SW_SIMULATED),
>   - set the flag when calling memory_failure() from the three callers
>     mentioned above,
>   - define a global variable (typed bool) in mm/memory_failure.c_to show that
>     the system has experienced a real hardware memory error events.
>   - once memory_failure() is called without MF_SW_SIMULATED, the new global
>     bool variable is set, and afterward unpoison_memory always fails with
>     -EOPNOTSUPP.

Exactly what I had in mind.

-- 
Thanks,

David / dhildenb



  reply	other threads:[~2022-06-14  7:13 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-14  4:38 [PATCH v4 0/2] mm/memory-failure: don't allow to unpoison hw corrupted page zhenwei pi
2022-06-14  4:38 ` [PATCH v4 1/2] mm/memory-failure: introduce "hwpoisoned-pages" entry zhenwei pi
2022-06-14  5:12   ` Muchun Song
2022-06-14  7:09   ` HORIGUCHI NAOYA(堀口 直也)
2022-06-14  7:13     ` David Hildenbrand [this message]
2022-06-14  7:23       ` [External] " zhenwei pi
2022-06-14  8:19       ` Miaohe Lin
2022-06-14  4:38 ` [PATCH v4 2/2] mm/memory-failure: disable unpoison once hw error happens zhenwei pi

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=66c43dac-32ac-5801-c76c-01607d68e38b@redhat.com \
    --to=david@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=linmiaohe@huawei.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=naoya.horiguchi@nec.com \
    --cc=pizhenwei@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;
as well as URLs for NNTP newsgroup(s).