* [to-be-updated] mm-migrate-fix-thps-mapcount-on-isolation.patch removed from -mm tree
@ 2022-11-24 22:11 Andrew Morton
0 siblings, 0 replies; only message in thread
From: Andrew Morton @ 2022-11-24 22:11 UTC (permalink / raw)
To: mm-commits, ziy, zhenyzha, william.kucharski, stable,
kirill.shutemov, david, gshan, akpm
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-11-24 22:11 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-24 22:11 [to-be-updated] mm-migrate-fix-thps-mapcount-on-isolation.patch removed from -mm tree Andrew Morton
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.