Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 151537
b: refs/heads/master
c: ed0ae21
h: refs/heads/master
i:
  151535: 972f129
v: v3
  • Loading branch information
Mel Gorman authored and Linus Torvalds committed Jun 17, 2009
1 parent 88c1848 commit 5ee1dd8
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 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: 0ac3a4099b0171ff965836182bc688bb8ca01058
refs/heads/master: ed0ae21dc5fe3b9ad4cf1c7bb2bfd2ad596c481c
16 changes: 10 additions & 6 deletions trunk/mm/page_alloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -452,16 +452,18 @@ static inline int page_is_buddy(struct page *page, struct page *buddy,
*/

static inline void __free_one_page(struct page *page,
struct zone *zone, unsigned int order)
struct zone *zone, unsigned int order,
int migratetype)
{
unsigned long page_idx;
int order_size = 1 << order;
int migratetype = get_pageblock_migratetype(page);

if (unlikely(PageCompound(page)))
if (unlikely(destroy_compound_page(page, order)))
return;

VM_BUG_ON(migratetype == -1);

page_idx = page_to_pfn(page) & ((1 << MAX_ORDER) - 1);

VM_BUG_ON(page_idx & (order_size - 1));
Expand Down Expand Up @@ -530,17 +532,18 @@ static void free_pages_bulk(struct zone *zone, int count,
page = list_entry(list->prev, struct page, lru);
/* have to delete it as __free_one_page list manipulates */
list_del(&page->lru);
__free_one_page(page, zone, order);
__free_one_page(page, zone, order, page_private(page));
}
spin_unlock(&zone->lock);
}

static void free_one_page(struct zone *zone, struct page *page, int order)
static void free_one_page(struct zone *zone, struct page *page, int order,
int migratetype)
{
spin_lock(&zone->lock);
zone_clear_flag(zone, ZONE_ALL_UNRECLAIMABLE);
zone->pages_scanned = 0;
__free_one_page(page, zone, order);
__free_one_page(page, zone, order, migratetype);
spin_unlock(&zone->lock);
}

Expand All @@ -565,7 +568,8 @@ static void __free_pages_ok(struct page *page, unsigned int order)

local_irq_save(flags);
__count_vm_events(PGFREE, 1 << order);
free_one_page(page_zone(page), page, order);
free_one_page(page_zone(page), page, order,
get_pageblock_migratetype(page));
local_irq_restore(flags);
}

Expand Down

0 comments on commit 5ee1dd8

Please sign in to comment.