Re: [PATCH] mm/huge_memory: softleaf device private fixes in remove_migration_pmd()

From: David Hildenbrand (Red Hat)

Date: Thu Nov 13 2025 - 02:32:24 EST


On 13.11.25 06:03, Balbir Singh wrote:
On 11/12/25 22:37, David Hildenbrand (Red Hat) wrote:
On 12.11.25 05:46, Balbir Singh wrote:
commit a6ca2ba46390 ("mm: replace pmd_to_swp_entry() with softleaf_from_pmd()")

So should this be squashed into Lorenzo patch, or incorporated in his series in case he has to resend?

does not work with device private THP entries. softleaf_is_migration_young()
asserts that the entry be a migration entry, but in the current code, the
entry might already be replaced by a device private entry by the time the
check is made. The issue exists with commit
7385dbdbf841 ("mm/rmap: extend rmap and migration support device-private entries")


Because this confuses me. If it's already a problem in the commit-to-go-upstream-first, it should be fixed in that commit?


Not sure how to handle this, because that would break rebase of mm/mm-new
or I'd have to send a replacement patch for the original patch from Lorenzo
(which does not seem right).

Yes, to be expected. Maybe Andrew can figure out how do address the rebase, or we can give him a helping hand :)


I'll post a simpler patch, but it needs to be on top of the series

Agreed, thanks.

--
Cheers

David