]> git.baikalelectronics.ru Git - kernel.git/commit
mm/migrate: correct thp migration stats
authorZi Yan <ziy@nvidia.com>
Sat, 26 Sep 2020 04:19:14 +0000 (21:19 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sat, 26 Sep 2020 17:33:57 +0000 (10:33 -0700)
commit269725d88248450d21ecdc2f0387e731dfb1eb0c
tree5442c016dc981a8c277fda37495f532c60a88c48
parent91b3965b9f6f83cfa257f209747f31bef10392eb
mm/migrate: correct thp migration stats

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.

Clean up thp handling code too when we are there.

Fixes: 7f9aa991e53d ("mm/vmstat: add events for THP migration without split")
Signed-off-by: Zi Yan <ziy@nvidia.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Reviewed-by: Daniel Jordan <daniel.m.jordan@oracle.com>
Cc: Anshuman Khandual <anshuman.khandual@arm.com>
Link: https://lkml.kernel.org/r/20200917210413.1462975-1-zi.yan@sent.com
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/migrate.c