Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 73564
b: refs/heads/master
c: 44048d7
h: refs/heads/master
v: v3
  • Loading branch information
Linus Torvalds committed Nov 12, 2007
1 parent d8c4c09 commit e39b016
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 21 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: e6a5c27f3b0fef72e528fc35e343af4b2db790ff
refs/heads/master: 44048d700bcbfaf4bcca6e2e0a73d89d01ec0878
20 changes: 0 additions & 20 deletions trunk/mm/page_alloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -749,23 +749,6 @@ int move_freepages_block(struct zone *zone, struct page *page, int migratetype)
return move_freepages(zone, start_page, end_page, migratetype);
}

/* Return the page with the lowest PFN in the list */
static struct page *min_page(struct list_head *list)
{
unsigned long min_pfn = -1UL;
struct page *min_page = NULL, *page;;

list_for_each_entry(page, list, lru) {
unsigned long pfn = page_to_pfn(page);
if (pfn < min_pfn) {
min_pfn = pfn;
min_page = page;
}
}

return min_page;
}

/* Remove an element from the buddy allocator from the fallback list */
static struct page *__rmqueue_fallback(struct zone *zone, int order,
int start_migratetype)
Expand All @@ -789,11 +772,8 @@ static struct page *__rmqueue_fallback(struct zone *zone, int order,
if (list_empty(&area->free_list[migratetype]))
continue;

/* Bias kernel allocations towards low pfns */
page = list_entry(area->free_list[migratetype].next,
struct page, lru);
if (unlikely(start_migratetype != MIGRATE_MOVABLE))
page = min_page(&area->free_list[migratetype]);
area->nr_free--;

/*
Expand Down

0 comments on commit e39b016

Please sign in to comment.