The quilt patch titled Subject: mm: migrate: Fix THP's mapcount on isolation has been removed from the -mm tree. Its filename was mm-migrate-fix-thps-mapcount-on-isolation.patch
This patch was dropped because an updated version will be merged
------------------------------------------------------ From: Gavin Shan gshan@redhat.com Subject: mm: migrate: Fix THP's mapcount on isolation Date: Wed, 23 Nov 2022 08:57:52 +0800
The issue is reported when removing memory through virtio_mem device. The transparent huge page, experienced copy-on-write fault, is wrongly regarded as pinned. The transparent huge page is escaped from being isolated in isolate_migratepages_block(). The transparent huge page can't be migrated and the corresponding memory block can't be put into offline state.
Fix it by replacing page_mapcount() with total_mapcount(). With this, the transparent huge page can be isolated and migrated, and the memory block can be put into offline state.
Link: https://lkml.kernel.org/r/20221123005752.161003-1-gshan@redhat.com Fixes: 3917c80280c9 ("thp: change CoW semantics for anon-THP") Signed-off-by: Gavin Shan gshan@redhat.com Reported-by: Zhenyu Zhang zhenyzha@redhat.com Suggested-by: David Hildenbrand david@redhat.com Cc: David Hildenbrand david@redhat.com Cc: Kirill A. Shutemov kirill.shutemov@linux.intel.com Cc: William Kucharski william.kucharski@oracle.com Cc: Zi Yan ziy@nvidia.com Cc: stable@vger.kernel.org [v5.8+] Signed-off-by: Andrew Morton akpm@linux-foundation.org ---
mm/compaction.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
--- a/mm/compaction.c~mm-migrate-fix-thps-mapcount-on-isolation +++ a/mm/compaction.c @@ -990,7 +990,7 @@ isolate_migratepages_block(struct compac * admittedly racy check. */ mapping = page_mapping(page); - if (!mapping && page_count(page) > page_mapcount(page)) + if (!mapping && page_count(page) > total_mapcount(page)) goto isolate_fail;
/* _
Patches currently in -mm which might be from gshan@redhat.com are