Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 164427
b: refs/heads/master
c: 2f66a68
h: refs/heads/master
i:
  164425: 3881716
  164423: 9839abf
v: v3
  • Loading branch information
Mel Gorman authored and Linus Torvalds committed Sep 22, 2009
1 parent 49631bd commit 82fc59c
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 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: fe1ff49d0d1c30254dbfc84c3786eb538e0cc7d1
refs/heads/master: 2f66a68f3fac2e94da360c342ff78ab45553f86c
16 changes: 14 additions & 2 deletions trunk/mm/page_alloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -783,6 +783,17 @@ static int move_freepages_block(struct zone *zone, struct page *page,
return move_freepages(zone, start_page, end_page, migratetype);
}

static void change_pageblock_range(struct page *pageblock_page,
int start_order, int migratetype)
{
int nr_pageblocks = 1 << (start_order - pageblock_order);

while (nr_pageblocks--) {
set_pageblock_migratetype(pageblock_page, migratetype);
pageblock_page += pageblock_nr_pages;
}
}

/* Remove an element from the buddy allocator from the fallback list */
static inline struct page *
__rmqueue_fallback(struct zone *zone, int order, int start_migratetype)
Expand Down Expand Up @@ -836,8 +847,9 @@ __rmqueue_fallback(struct zone *zone, int order, int start_migratetype)
list_del(&page->lru);
rmv_page_order(page);

if (current_order == pageblock_order)
set_pageblock_migratetype(page,
/* Take ownership for orders >= pageblock_order */
if (current_order >= pageblock_order)
change_pageblock_range(page, current_order,
start_migratetype);

expand(zone, page, order, current_order, area, migratetype);
Expand Down

0 comments on commit 82fc59c

Please sign in to comment.