From: Yuanhe Shu <xiangzao@linux.alibaba.com>
To: akpm@linux-foundation.org, david@kernel.org
Cc: "Huang, Ying" <ying.huang@linux.alibaba.com>,
"Kaitao Cheng" <kaitao.cheng@linux.dev>,
vbabka@kernel.org, ljs@kernel.org, liam@infradead.org,
rppt@kernel.org, surenb@google.com, mhocko@suse.com,
linmiaohe@huawei.com, nao.horiguchi@gmail.com, ziy@nvidia.com,
wangkefeng.wang@huawei.com, tujinjiang@huawei.com,
mgorman@techsingularity.net, chengkaitao@kylinos.cn,
muchun.song@linux.dev, linux-mm@kvack.org,
linux-kernel@vger.kernel.org, xiangzao@linux.alibaba.com
Subject: Re: [PATCH] mm/highmem: refuse to copy hwpoisoned folios in the !copy_mc fallbacks
Date: Tue, 27 Oct 2026 20:13:14 +0800 [thread overview]
Message-ID: <20261027121314.1221539-1-xiangzao@linux.alibaba.com> (raw)
In-Reply-To: <f28b2414-ff07-427c-8e18-e950b492b351@kernel.org>
On 10/26/26 09:55, David Hildenbrand wrote:
> As I said in the other thread, how is copying data that was already
> poisoned (and might trigger another MCE) reasonable?
>
> (although I do wonder about memory barriers ... hmmm)
Agreed, the next version will shorten it.
On the copy itself: you are right, it is not reasonable. Huang Ying
suggests the same in his reply - the next version checks before the
copy as well, so data the flag already condemns is not read at all.
The check after the copy stays for the flag that lands while the copy
runs: the data has been read already, the destination folio carries
no marker, and the callers discard it on refusal.
On the memory barriers: PG_hwpoison is set atomically and not
cleared while the page is alive. An unsynchronized check can only
miss a concurrently set flag. That is the residual window. And a
check that sees the flag set is never wrong.
--
Yuanhe
next prev parent reply other threads:[~2026-10-27 12:13 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-26 2:57 Yuanhe Shu
2026-10-26 9:55 ` David Hildenbrand (Arm)
2026-10-27 12:13 ` Yuanhe Shu [this message]
2026-10-26 11:21 ` Huang, Ying
2026-10-26 12:17 ` Garg, Shivank
2026-10-27 1:33 ` Huang, Ying
2026-10-27 1:40 ` Huang, Ying
2026-10-27 12:14 ` Yuanhe Shu
2026-10-26 12:09 ` Garg, Shivank
2026-10-27 12:20 ` Yuanhe Shu
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=20261027121314.1221539-1-xiangzao@linux.alibaba.com \
--to=xiangzao@linux.alibaba.com \
--cc=akpm@linux-foundation.org \
--cc=chengkaitao@kylinos.cn \
--cc=david@kernel.org \
--cc=kaitao.cheng@linux.dev \
--cc=liam@infradead.org \
--cc=linmiaohe@huawei.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=ljs@kernel.org \
--cc=mgorman@techsingularity.net \
--cc=mhocko@suse.com \
--cc=muchun.song@linux.dev \
--cc=nao.horiguchi@gmail.com \
--cc=rppt@kernel.org \
--cc=surenb@google.com \
--cc=tujinjiang@huawei.com \
--cc=vbabka@kernel.org \
--cc=wangkefeng.wang@huawei.com \
--cc=ying.huang@linux.alibaba.com \
--cc=ziy@nvidia.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
all inboxes | Powered by JetHome®