Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 344818
b: refs/heads/master
c: d28d433
h: refs/heads/master
v: v3
  • Loading branch information
Mel Gorman committed Dec 11, 2012
1 parent e92854d commit ad55d4f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 7548341b28956ccd35a63ab12f01d8541041aa70
refs/heads/master: d28d433512f4f387e2563c14db45a7bb8a338b1a
8 changes: 4 additions & 4 deletions trunk/mm/migrate.c
Original file line number Diff line number Diff line change
Expand Up @@ -1492,7 +1492,7 @@ bool migrate_ratelimited(int node)
}

/* Returns true if the node is migrate rate-limited after the update */
bool numamigrate_update_ratelimit(pg_data_t *pgdat)
bool numamigrate_update_ratelimit(pg_data_t *pgdat, unsigned long nr_pages)
{
bool rate_limited = false;

Expand All @@ -1510,7 +1510,7 @@ bool numamigrate_update_ratelimit(pg_data_t *pgdat)
if (pgdat->numabalancing_migrate_nr_pages > ratelimit_pages)
rate_limited = true;
else
pgdat->numabalancing_migrate_nr_pages++;
pgdat->numabalancing_migrate_nr_pages += nr_pages;
spin_unlock(&pgdat->numabalancing_migrate_lock);

return rate_limited;
Expand Down Expand Up @@ -1579,7 +1579,7 @@ int migrate_misplaced_page(struct page *page, int node)
* Optimal placement is no good if the memory bus is saturated and
* all the time is being spent migrating!
*/
if (numamigrate_update_ratelimit(pgdat)) {
if (numamigrate_update_ratelimit(pgdat, 1)) {
put_page(page);
goto out;
}
Expand Down Expand Up @@ -1630,7 +1630,7 @@ int migrate_misplaced_transhuge_page(struct mm_struct *mm,
* Optimal placement is no good if the memory bus is saturated and
* all the time is being spent migrating!
*/
if (numamigrate_update_ratelimit(pgdat))
if (numamigrate_update_ratelimit(pgdat, HPAGE_PMD_NR))
goto out_dropref;

new_page = alloc_pages_node(node,
Expand Down

0 comments on commit ad55d4f

Please sign in to comment.