File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -1659,6 +1659,10 @@ static int migrate_pages_batch(struct list_head *from,
1659
1659
* migrate_pages() may report success with (split but
1660
1660
* unmigrated) pages still on its fromlist; whereas it
1661
1661
* always reports success when its fromlist is empty.
1662
+ * stats->nr_thp_failed should be increased too,
1663
+ * otherwise stats inconsistency will happen when
1664
+ * migrate_pages_batch is called via migrate_pages()
1665
+ * with MIGRATE_SYNC and MIGRATE_ASYNC.
1662
1666
*
1663
1667
* Only check it without removing it from the list.
1664
1668
* Since the folio can be on deferred_split_scan()
@@ -1675,6 +1679,7 @@ static int migrate_pages_batch(struct list_head *from,
1675
1679
!list_empty (& folio -> _deferred_list )) {
1676
1680
if (try_split_folio (folio , split_folios ) == 0 ) {
1677
1681
nr_failed ++ ;
1682
+ stats -> nr_thp_failed += is_thp ;
1678
1683
stats -> nr_thp_split += is_thp ;
1679
1684
stats -> nr_split ++ ;
1680
1685
continue ;
You can’t perform that action at this time.
0 commit comments