From: "Huang, Ying" <ying.huang@linux.alibaba.com>
To: Yuanhe Shu <xiangzao@linux.alibaba.com>
Cc: akpm@linux-foundation.org, david@kernel.org,
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
Subject: Re: [PATCH] mm/highmem: refuse to copy hwpoisoned folios in the !copy_mc fallbacks
Date: Tue, 27 Oct 2026 09:40:30 +0800 [thread overview]
Message-ID: <877bj37wfl.fsf@DESKTOP-5N7EMDA> (raw)
In-Reply-To: <87pkww7lnl.fsf@DESKTOP-5N7EMDA> (Ying Huang's message of "Mon, 26 Oct 2026 19:21:02 +0800")
"Huang, Ying" <ying.huang@linux.alibaba.com> writes:
> Yuanhe Shu <xiangzao@linux.alibaba.com> writes:
>
>> Where copy_mc_to_kernel is defined, copy_mc_user_highpage() and
>> copy_mc_highpage() stop at a hardware error during the copy, report
>> the not-copied bytes and queue the source page for memory_failure().
>> The !copy_mc fallbacks return 0 after a plain copy instead. With
>> PG_hwpoison set while the data stays readable - software-injected
>> poison (MADV_HWPOISON, the debugfs corrupt-pfn injector) or a
>> transient hardware error - there is no fault to recover from: the
>> copy completes, the destination folio carries no poison marker, and
>> the poison is consumed silently, the same poison consumption
>> commit 841a8bfcbad9 ("mm: prevent poison consumption when splitting
>> THP") refused to risk on the split path.
>
> As far as I know, software-injected poison is used for debugging only ,
> so I don't think it's that important. Hardware poison state in DDR is
> sticky; that is, even a transient hardware error will cause a permanent
> hardware poison state until a reset.
>
> Therefore, the primary value of this patch should be to reduce machine
> checks (and panics) during memory copies. If so, we should place the
> check code before copying.
>
Another factor to consider is performance; the change shouldn't hurt
performance. Please do some performance tests and share the results
too.
---
Best Regards,
Huang, Ying
next prev parent reply other threads:[~2026-10-27 1:40 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
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 [this message]
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=877bj37wfl.fsf@DESKTOP-5N7EMDA \
--to=ying.huang@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=xiangzao@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®