From: Kiryl Shutsemau <kirill@shutemov.name>
To: David Hildenbrand <david@redhat.com>
Cc: Lance Yang <lance.yang@linux.dev>,
akpm@linux-foundation.org, lorenzo.stoakes@oracle.com,
Liam.Howlett@oracle.com, baohua@kernel.org,
baolin.wang@linux.alibaba.com, dev.jain@arm.com,
hughd@google.com, ioworker0@gmail.com,
linux-kernel@vger.kernel.org, linux-mm@kvack.org,
mpenttil@redhat.com, npache@redhat.com, ryan.roberts@arm.com,
ziy@nvidia.com, richard.weiyang@gmail.com
Subject: Re: [PATCH mm-new 1/1] mm/khugepaged: abort collapse scan on non-swap entries
Date: Wed, 24 Sep 2025 11:17:00 +0100 [thread overview]
Message-ID: <2i5t62obfweid2zrt33vo3boviw4okha4d3gglw76eqv43ofky@pdv3evw5yjmh> (raw)
In-Reply-To: <1282de5a-3dce-443d-91d1-111103140973@redhat.com>
On Wed, Sep 24, 2025 at 12:10:47PM +0200, David Hildenbrand wrote:
> On 24.09.25 12:02, Lance Yang wrote:
> > From: Lance Yang <lance.yang@linux.dev>
> >
> > The existing check in hpage_collapse_scan_pmd() is specific to uffd-wp
> > markers. Other special markers (e.g., GUARD, POISONED) would not be caught
> > early, leading to failures deeper in the swap-in logic.
> >
> > hpage_collapse_scan_pmd()
> > `- collapse_huge_page()
> > `- __collapse_huge_page_swapin() -> fails!
> >
> > As David suggested[1], this patch skips any such non-swap entries early.
> > If a special marker is found, the scan is aborted immediately with the
> > SCAN_PTE_NON_PRESENT result, as Lorenzo suggested[2], avoiding wasted
> > work.
>
> Note that I suggested to skip all non-present entries except swap entries,
> which includes migration entries, hwpoisoned entries etc.
Hm. So swap in is fine, but wait for migration to complete is not?
Seems odd.
--
Kiryl Shutsemau / Kirill A. Shutemov
next prev parent reply other threads:[~2025-09-24 10:17 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-24 10:02 Lance Yang
2025-09-24 10:10 ` David Hildenbrand
2025-09-24 10:17 ` Kiryl Shutsemau [this message]
2025-09-24 10:40 ` David Hildenbrand
2025-09-24 11:47 ` Lance Yang
2025-09-29 10:10 ` Lance Yang
2025-09-29 10:29 ` David Hildenbrand
2025-09-29 10:39 ` Lance Yang
2025-09-24 10:10 ` Kiryl Shutsemau
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=2i5t62obfweid2zrt33vo3boviw4okha4d3gglw76eqv43ofky@pdv3evw5yjmh \
--to=kirill@shutemov.name \
--cc=Liam.Howlett@oracle.com \
--cc=akpm@linux-foundation.org \
--cc=baohua@kernel.org \
--cc=baolin.wang@linux.alibaba.com \
--cc=david@redhat.com \
--cc=dev.jain@arm.com \
--cc=hughd@google.com \
--cc=ioworker0@gmail.com \
--cc=lance.yang@linux.dev \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=lorenzo.stoakes@oracle.com \
--cc=mpenttil@redhat.com \
--cc=npache@redhat.com \
--cc=richard.weiyang@gmail.com \
--cc=ryan.roberts@arm.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