Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 230715
b: refs/heads/master
c: 9927af7
h: refs/heads/master
i:
  230713: 3f83cc0
  230711: 005b693
v: v3
  • Loading branch information
Mel Gorman authored and Linus Torvalds committed Jan 14, 2011
1 parent ec6694b commit d9361da
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 7f0f24967b0349798803260b2e4bf347cffa1990
refs/heads/master: 9927af740b1b9b1e769310bd0b91425e8047b803
15 changes: 15 additions & 0 deletions trunk/mm/compaction.c
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,7 @@ static unsigned long isolate_migratepages(struct zone *zone,
struct compact_control *cc)
{
unsigned long low_pfn, end_pfn;
unsigned long last_pageblock_nr = 0, pageblock_nr;
unsigned long nr_scanned = 0, nr_isolated = 0;
struct list_head *migratelist = &cc->migratepages;

Expand Down Expand Up @@ -280,6 +281,20 @@ static unsigned long isolate_migratepages(struct zone *zone,
if (PageBuddy(page))
continue;

/*
* For async migration, also only scan in MOVABLE blocks. Async
* migration is optimistic to see if the minimum amount of work
* satisfies the allocation
*/
pageblock_nr = low_pfn >> pageblock_order;
if (!cc->sync && last_pageblock_nr != pageblock_nr &&
get_pageblock_migratetype(page) != MIGRATE_MOVABLE) {
low_pfn += pageblock_nr_pages;
low_pfn = ALIGN(low_pfn, pageblock_nr_pages) - 1;
last_pageblock_nr = pageblock_nr;
continue;
}

/* Try isolate the page */
if (__isolate_lru_page(page, ISOLATE_BOTH, 0) != 0)
continue;
Expand Down

0 comments on commit d9361da

Please sign in to comment.