Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 332443
b: refs/heads/master
c: 723a064
h: refs/heads/master
i:
  332441: 7d1dea6
  332439: 2625201
v: v3
  • Loading branch information
Minchan Kim authored and Linus Torvalds committed Oct 9, 2012
1 parent 980b85b commit 3929fc1
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 15 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: 3f6d4caeb9a9d8f7e5bbf3f49f1fd71e1414ff64
refs/heads/master: 723a0644a7255f532575fd43245f9ef976491328
3 changes: 2 additions & 1 deletion trunk/include/linux/page-isolation.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ int test_pages_isolated(unsigned long start_pfn, unsigned long end_pfn);
*/
int set_migratetype_isolate(struct page *page);
void unset_migratetype_isolate(struct page *page, unsigned migratetype);

struct page *alloc_migrate_target(struct page *page, unsigned long private,
int **resultp);

#endif
14 changes: 1 addition & 13 deletions trunk/mm/page_alloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -5667,18 +5667,6 @@ static unsigned long pfn_max_align_up(unsigned long pfn)
pageblock_nr_pages));
}

static struct page *
__alloc_contig_migrate_alloc(struct page *page, unsigned long private,
int **resultp)
{
gfp_t gfp_mask = GFP_USER | __GFP_MOVABLE;

if (PageHighMem(page))
gfp_mask |= __GFP_HIGHMEM;

return alloc_page(gfp_mask);
}

/* [start, end) must belong to a single zone. */
static int __alloc_contig_migrate_range(struct compact_control *cc,
unsigned long start, unsigned long end)
Expand Down Expand Up @@ -5714,7 +5702,7 @@ static int __alloc_contig_migrate_range(struct compact_control *cc,
reclaim_clean_pages_from_list(cc->zone, &cc->migratepages);

ret = migrate_pages(&cc->migratepages,
__alloc_contig_migrate_alloc,
alloc_migrate_target,
0, false, MIGRATE_SYNC);
}

Expand Down
11 changes: 11 additions & 0 deletions trunk/mm/page_isolation.c
Original file line number Diff line number Diff line change
Expand Up @@ -255,3 +255,14 @@ int test_pages_isolated(unsigned long start_pfn, unsigned long end_pfn)
spin_unlock_irqrestore(&zone->lock, flags);
return ret ? 0 : -EBUSY;
}

struct page *alloc_migrate_target(struct page *page, unsigned long private,
int **resultp)
{
gfp_t gfp_mask = GFP_USER | __GFP_MOVABLE;

if (PageHighMem(page))
gfp_mask |= __GFP_HIGHMEM;

return alloc_page(gfp_mask);
}

0 comments on commit 3929fc1

Please sign in to comment.