From: "David Hildenbrand (Arm)" <david@kernel.org>
To: Mani Tofigh <mt4022@columbia.edu>,
Oscar Salvador <osalvador@suse.de>,
Andrew Morton <akpm@linux-foundation.org>
Cc: Miaohe Lin <linmiaohe@huawei.com>,
Naoya Horiguchi <nao.horiguchi@gmail.com>,
Vlastimil Babka <vbabka@kernel.org>,
Gregory Price <gourry@gourry.net>,
linux-mm@kvack.org, linux-cxl@vger.kernel.org,
linux-kernel@vger.kernel.org, tz2294@columbia.edu,
stable@vger.kernel.org
Subject: Re: [PATCH] mm/memory_hotplug: don't offline a hwpoisoned page still in the page cache
Date: Sat, 7 Nov 2026 20:41:20 +0100 [thread overview]
Message-ID: <a2ec6814-d3d3-425a-b379-f99b219aa55e@kernel.org> (raw)
In-Reply-To: <a002901b-715a-4adc-bdcb-7a6fcda67711@columbia.edu>
On 11/3/26 20:59, Mani Tofigh wrote:
> On 11/2/26 1:56 AM, David Hildenbrand (Arm) wrote:
>>
>> What if we still have the page pinned somehow? (vmscplice etc).
>>
>> Wouldn't it be better to make sure that poisoning code holds exactly one
>> reference (whoever set hwpoison) and check here that the refcount is 1 ?
>>
>> Pagecache references would turn it > 1.
>
>
> Yes right, a pin isn't covered (neither before nor with this patch).
>
> I don't think refcount == 1 can replace the mapping check though. In the
> race from the changelog memory_failure() has set PG_hwpoison but is
> still waiting in get_hwpoison_page(), so it doesn't hold its reference
> yet, and a clean page-cache folio then has just the one reference from
> the page cache. memory_failure() also doesn't take a reference on the
> kernel pages it ignores, and a poisoned page that gets freed later sits
> at 0.
So the right fix is to fix that then.
We'd need to sync memory_failure() with memory offlining, correct?
--
Cheers,
David
prev parent reply other threads:[~2026-11-07 19:41 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-01 19:40 Mani Tofigh via B4 Relay
2026-11-02 6:56 ` David Hildenbrand (Arm)
2026-11-03 19:59 ` Mani Tofigh
2026-11-07 19:41 ` David Hildenbrand (Arm) [this message]
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=a2ec6814-d3d3-425a-b379-f99b219aa55e@kernel.org \
--to=david@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=gourry@gourry.net \
--cc=linmiaohe@huawei.com \
--cc=linux-cxl@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mt4022@columbia.edu \
--cc=nao.horiguchi@gmail.com \
--cc=osalvador@suse.de \
--cc=stable@vger.kernel.org \
--cc=tz2294@columbia.edu \
--cc=vbabka@kernel.org \
/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®