mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Miaohe Lin <linmiaohe@huawei.com>
To: Mani Tofigh <mt4022@columbia.edu>
Cc: David Hildenbrand <david@kernel.org>,
	Naoya Horiguchi <nao.horiguchi@gmail.com>,
	Kiryl Shutsemau <kas@kernel.org>, Mike Rapoport <rppt@kernel.org>,
	Mike Kravetz <mike.kravetz@oracle.com>,
	Matthew Wilcox <willy@infradead.org>, <linux-mm@kvack.org>,
	<linux-kernel@vger.kernel.org>, <tz2294@columbia.edu>,
	<stable@vger.kernel.org>, Muchun Song <muchun.song@linux.dev>,
	Oscar Salvador <osalvador@suse.de>,
	Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH v3] mm/memory-failure: set PG_hwpoison of a non-hugetlb page under hugetlb_lock
Date: Tue, 24 Nov 2026 11:11:41 +0800	[thread overview]
Message-ID: <53d2f7e6-581a-ec05-6dc5-59a892ace835@huawei.com> (raw)
In-Reply-To: <56de516a-c895-44a0-94f5-ea7bc5bd3ef9@columbia.edu>

On 2026/11/24 2:52, Mani Tofigh wrote:
> On 11/23/26 2:26 AM, Miaohe Lin wrote:
>> If P's struct page is past the first vmemmap page, the hwpoison flag is lost. In this case,
>> do we need to do something? Now that hwpoison flag is already lost, I don't think so. And
>> TestClearPageHWPoison won't do anything in this case. Or do you mean TestClearPageHWPoison
>> will always write even if hwpoison flag is not set? If so, can test + clear do the work?
> 
> 
> Yup, that's what I meant. And good call, test + clear works too.
> 
>> I think we can correctly clear the stale flag from the first round.
> 
> 
> Yes actually, so just this under Muchun's rwsem:
> if (PageHWPoison(p))
>   ClearPageHWPoison(p);
> 
> should be enough? I can do this for v5; sounds good?

Yes, sounds good to me. And some comments might be helpful. But do we really need that rwsem?
Could we avoid using that specified rwsem?

Thanks.
.

  reply	other threads:[~2026-11-24  3:11 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-06 16:09 Mani Tofigh via B4 Relay
2026-11-06 22:39 ` Andrew Morton
2026-11-09 11:29   ` Miaohe Lin
2026-11-09  7:23 ` Miaohe Lin
2026-11-11 23:21   ` Mani Tofigh
2026-11-17  7:01     ` Miaohe Lin
2026-11-23  6:19       ` Mani Tofigh
2026-11-23  7:26         ` Miaohe Lin
2026-11-23 18:52           ` Mani Tofigh
2026-11-24  3:11             ` Miaohe Lin [this message]
2026-11-24  3:17               ` Mani Tofigh

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=53d2f7e6-581a-ec05-6dc5-59a892ace835@huawei.com \
    --to=linmiaohe@huawei.com \
    --cc=akpm@linux-foundation.org \
    --cc=david@kernel.org \
    --cc=kas@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mike.kravetz@oracle.com \
    --cc=mt4022@columbia.edu \
    --cc=muchun.song@linux.dev \
    --cc=nao.horiguchi@gmail.com \
    --cc=osalvador@suse.de \
    --cc=rppt@kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=tz2294@columbia.edu \
    --cc=willy@infradead.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®