linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] migrate_pages: modify max number of pages to migrate in batch
@ 2024-06-24  4:51 Zhenneng Li
  2024-06-25  1:17 ` Huang, Ying
  0 siblings, 1 reply; 4+ messages in thread
From: Zhenneng Li @ 2024-06-24  4:51 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-mm, linux-kernel, Zhenneng Li

We restrict the number of pages to be migrated to no more than
HPAGE_PMD_NR or NR_MAX_BATCHED_MIGRATION, but in fact, the
number of pages to be migrated may reach 2*HPAGE_PMD_NR-1 or 2
*NR_MAX_BATCHED_MIGRATION-1, it's not in inconsistent with the context.

Please refer to the patch: 42012e0436d4(migrate_pages: restrict number
of pages to migrate in batch)

Signed-off-by: Zhenneng Li <lizhenneng@kylinos.cn>
---
 mm/migrate.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mm/migrate.c b/mm/migrate.c
index 781979567f64..7a4b37aac9e8 100644
--- a/mm/migrate.c
+++ b/mm/migrate.c
@@ -1961,7 +1961,7 @@ int migrate_pages(struct list_head *from, new_folio_t get_new_folio,
 			break;
 	}
 	if (nr_pages >= NR_MAX_BATCHED_MIGRATION)
-		list_cut_before(&folios, from, &folio2->lru);
+		list_cut_before(&folios, from, &folio->lru);
 	else
 		list_splice_init(from, &folios);
 	if (mode == MIGRATE_ASYNC)
-- 
2.25.1



^ permalink raw reply	[flat|nested] 4+ messages in thread
* [PATCH] migrate_pages: modify max number of pages to migrate in batch
@ 2024-06-24  4:41 Zhenneng Li
  0 siblings, 0 replies; 4+ messages in thread
From: Zhenneng Li @ 2024-06-24  4:41 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-mm, linux-kernel

We restrict the number of pages to be migrated to no more than
HPAGE_PMD_NR or NR_MAX_BATCHED_MIGRATION, but in fact, the
number of pages to be migrated may reach 2*HPAGE_PMD_NR-1 or 2
*NR_MAX_BATCHED_MIGRATION-1, it's not in inconsistent with the context.

Please refer to the patch: 42012e0436d4(migrate_pages: restrict number
of pages to migrate in batch)

Signed-off-by: Zhenneng Li <lizhenneng@kylinos.cn>
---
 mm/migrate.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mm/migrate.c b/mm/migrate.c
index 781979567f64..7a4b37aac9e8 100644
--- a/mm/migrate.c
+++ b/mm/migrate.c
@@ -1961,7 +1961,7 @@ int migrate_pages(struct list_head *from, new_folio_t get_new_folio,
 			break;
 	}
 	if (nr_pages >= NR_MAX_BATCHED_MIGRATION)
-		list_cut_before(&folios, from, &folio2->lru);
+		list_cut_before(&folios, from, &folio->lru);
 	else
 		list_splice_init(from, &folios);
 	if (mode == MIGRATE_ASYNC)
-- 
2.25.1



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

end of thread, other threads:[~2024-06-26  7:57 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-06-24  4:51 [PATCH] migrate_pages: modify max number of pages to migrate in batch Zhenneng Li
2024-06-25  1:17 ` Huang, Ying
2024-06-26  7:56   ` Miaohe Lin
  -- strict thread matches above, loose matches on Subject: below --
2024-06-24  4:41 Zhenneng Li

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox