[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200917202729.1460743-1-zi.yan@sent.com>
Date: Thu, 17 Sep 2020 16:27:29 -0400
From: Zi Yan <zi.yan@...t.com>
To: Andrew Morton <akpm@...ux-foundation.org>
Cc: linux-mm@...ck.org, linux-kernel@...r.kernel.org,
Zi Yan <ziy@...dia.com>,
Daniel Jordan <daniel.m.jordan@...cle.com>,
Anshuman Khandual <anshuman.khandual@....com>
Subject: [PATCH] mm/migrate: correct thp migration stats.
From: Zi Yan <ziy@...dia.com>
PageTransHuge returns true for both thp and hugetlb, so thp stats was
counting both thp and hugetlb migrations. Exclude hugetlb migration by
setting is_thp variable right.
Fixes: 1a5bae25e3cf ("mm/vmstat: add events for THP migration without split")
Signed-off-by: Zi Yan <ziy@...dia.com>
Cc: Daniel Jordan <daniel.m.jordan@...cle.com>
Cc: Anshuman Khandual <anshuman.khandual@....com>
---
mm/migrate.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mm/migrate.c b/mm/migrate.c
index 941b89383cf3..d1ad964165e5 100644
--- a/mm/migrate.c
+++ b/mm/migrate.c
@@ -1445,7 +1445,7 @@ int migrate_pages(struct list_head *from, new_page_t get_new_page,
* Capture required information that might get lost
* during migration.
*/
- is_thp = PageTransHuge(page);
+ is_thp = PageTransHuge(page) && !PageHuge(page);
nr_subpages = thp_nr_pages(page);
cond_resched();
--
2.28.0
Powered by blists - more mailing lists