All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lance Yang <lance.yang@linux.dev>
To: Rik van Riel <riel@surriel.com>
Cc: kernel-team@meta.com,
	"David Hildenbrand (Arm)" <david@kernel.org>,
	linux-mm@kvack.org, akpm@linux-foundation.org, ljs@kernel.org,
	ziy@nvidia.com, baolin.wang@linux.alibaba.com,
	linux-kernel@vger.kernel.org, liam@infradead.org,
	npache@redhat.com, ryan.roberts@arm.com, dev.jain@arm.com,
	baohua@kernel.org, yang@os.amperecomputing.com
Subject: Re: [PATCH] mm/huge_memory: set PG_has_hwpoisoned only after new folio head is established
Date: Thu, 2 Jul 2026 10:29:10 +0800	[thread overview]
Message-ID: <a12f6959-5fe3-4f9b-9168-05e5aebd08ca@linux.dev> (raw)
In-Reply-To: <9df36c6f5819f7decb188f0fcf1b199b68e238e0.camel@surriel.com>



On 2026/7/2 01:24, Rik van Riel wrote:
> On Wed, 2026-07-01 at 18:33 +0200, David Hildenbrand (Arm) wrote:
>>
>> There is some grammatical issue that makes me wonder whether you are
>> talking
>> about the present or the past.
>>>
> 
> Changelog issues fixed for v2. Thank you.
> 
>>> Reproduced by syzkaller: hwpoison-inject a few subpages of a large
>>> shmem
>>> folio, then MADV_REMOVE (fallocate punch hole) on the same range,
>>> which
>>> splits the partial folio to a non-zero order.
>>
>> As Lance says, after we do the TestSetPageHWPoison() in
>> memory_failure(), we
>> call try_to_split_thp_page(). Does that already suffice, even without
>> the
>> MADV_REMOCE.
> 
> While fa5a06170036 was created to deal with having
> the folio split to >0 order, in this case it looks
> like the try_to_split_thp_page() call from memory_failure()
> failed, presumably because folio_ref_freeze() could not
> freeze the order 7 folio, because the reproducer had
> multiple threads poking at that folio simultaneously.
> 
> This test case is rather contrived, like most syzkaller
> tests, but given that the try_to_split_thp_page() call
> could fail for various reasons, we do need this fallback
> path.

Should be rare, but yeah, there it is. Wondered if the hwpoison-time
split had failed somehow ... turns out it did :)

Thanks for spelling that out!

      reply	other threads:[~2026-07-02  2:29 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-01 13:46 [PATCH] mm/huge_memory: set PG_has_hwpoisoned only after new folio head is established Rik van Riel
2026-07-01 14:34 ` Zi Yan
2026-07-01 14:52 ` Lorenzo Stoakes
2026-07-01 16:29   ` Rik van Riel
2026-07-01 15:24 ` Lance Yang
2026-07-01 16:33 ` David Hildenbrand (Arm)
2026-07-01 17:24   ` Rik van Riel
2026-07-02  2:29     ` Lance Yang [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=a12f6959-5fe3-4f9b-9168-05e5aebd08ca@linux.dev \
    --to=lance.yang@linux.dev \
    --cc=akpm@linux-foundation.org \
    --cc=baohua@kernel.org \
    --cc=baolin.wang@linux.alibaba.com \
    --cc=david@kernel.org \
    --cc=dev.jain@arm.com \
    --cc=kernel-team@meta.com \
    --cc=liam@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=ljs@kernel.org \
    --cc=npache@redhat.com \
    --cc=riel@surriel.com \
    --cc=ryan.roberts@arm.com \
    --cc=yang@os.amperecomputing.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.