aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mm/migrate.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/mm/migrate.c b/mm/migrate.c
index 26537c4f3094..f24e9cc49cc4 100644
--- a/mm/migrate.c
+++ b/mm/migrate.c
@@ -1492,7 +1492,7 @@ bool migrate_ratelimited(int node)
1492} 1492}
1493 1493
1494/* Returns true if the node is migrate rate-limited after the update */ 1494/* Returns true if the node is migrate rate-limited after the update */
1495bool numamigrate_update_ratelimit(pg_data_t *pgdat) 1495bool numamigrate_update_ratelimit(pg_data_t *pgdat, unsigned long nr_pages)
1496{ 1496{
1497 bool rate_limited = false; 1497 bool rate_limited = false;
1498 1498
@@ -1510,7 +1510,7 @@ bool numamigrate_update_ratelimit(pg_data_t *pgdat)
1510 if (pgdat->numabalancing_migrate_nr_pages > ratelimit_pages) 1510 if (pgdat->numabalancing_migrate_nr_pages > ratelimit_pages)
1511 rate_limited = true; 1511 rate_limited = true;
1512 else 1512 else
1513 pgdat->numabalancing_migrate_nr_pages++; 1513 pgdat->numabalancing_migrate_nr_pages += nr_pages;
1514 spin_unlock(&pgdat->numabalancing_migrate_lock); 1514 spin_unlock(&pgdat->numabalancing_migrate_lock);
1515 1515
1516 return rate_limited; 1516 return rate_limited;
@@ -1579,7 +1579,7 @@ int migrate_misplaced_page(struct page *page, int node)
1579 * Optimal placement is no good if the memory bus is saturated and 1579 * Optimal placement is no good if the memory bus is saturated and
1580 * all the time is being spent migrating! 1580 * all the time is being spent migrating!
1581 */ 1581 */
1582 if (numamigrate_update_ratelimit(pgdat)) { 1582 if (numamigrate_update_ratelimit(pgdat, 1)) {
1583 put_page(page); 1583 put_page(page);
1584 goto out; 1584 goto out;
1585 } 1585 }
@@ -1630,7 +1630,7 @@ int migrate_misplaced_transhuge_page(struct mm_struct *mm,
1630 * Optimal placement is no good if the memory bus is saturated and 1630 * Optimal placement is no good if the memory bus is saturated and
1631 * all the time is being spent migrating! 1631 * all the time is being spent migrating!
1632 */ 1632 */
1633 if (numamigrate_update_ratelimit(pgdat)) 1633 if (numamigrate_update_ratelimit(pgdat, HPAGE_PMD_NR))
1634 goto out_dropref; 1634 goto out_dropref;
1635 1635
1636 new_page = alloc_pages_node(node, 1636 new_page = alloc_pages_node(node,