linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH mmotm] mm/vmstat: Add events for PMD based THP migration without split fix
@ 2020-05-21 13:49 Hugh Dickins
  2020-05-21 18:54 ` Qian Cai
  2020-05-22  0:46 ` Anshuman Khandual
  0 siblings, 2 replies; 5+ messages in thread
From: Hugh Dickins @ 2020-05-21 13:49 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Anshuman Khandual, Naoya Horiguchi, Zi Yan, John Hubbard,
	linux-kernel, linux-mm

Fix 5.7-rc6-mm1 page migration crash in unmap_and_move(): when the
page to be migrated has been freed from under us, that is considered 
a MIGRATEPAGE_SUCCESS, but no newpage has been allocated (and I don't
think it would ever need to be counted as a successful THP migration).

Signed-off-by: Hugh Dickins <hughd@google.com>
---
Fix to mm-vmstat-add-events-for-pmd-based-thp-migration-without-split.patch

 mm/migrate.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- 5.7-rc6-mm1/mm/migrate.c	2020-05-20 12:21:56.117693827 -0700
+++ linux/mm/migrate.c	2020-05-20 15:08:12.319476978 -0700
@@ -1248,7 +1248,7 @@ out:
 	 * we want to retry.
 	 */
 	if (rc == MIGRATEPAGE_SUCCESS) {
-		if (PageTransHuge(newpage))
+		if (newpage && PageTransHuge(newpage))
 			thp_migration_success(true);
 		put_page(page);
 		if (reason == MR_MEMORY_FAILURE) {

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-05-22  1:22 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-21 13:49 [PATCH mmotm] mm/vmstat: Add events for PMD based THP migration without split fix Hugh Dickins
2020-05-21 18:54 ` Qian Cai
2020-05-21 19:48   ` Hugh Dickins
2020-05-22  0:46 ` Anshuman Khandual
2020-05-22  1:21   ` Hugh Dickins

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).