Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 338782
b: refs/heads/master
c: 2e30abd
h: refs/heads/master
v: v3
  • Loading branch information
Marek Szyprowski authored and Linus Torvalds committed Dec 12, 2012
1 parent fd1d004 commit b46e57d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 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: e1e12d2f3104be886073ac6c5c4678f30b1b9e51
refs/heads/master: 2e30abd1730751d58463d88bc0844ab8fd7112a9
17 changes: 9 additions & 8 deletions trunk/mm/page_alloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1394,21 +1394,22 @@ int capture_free_page(struct page *page, int alloc_order, int migratetype)

zone = page_zone(page);
order = page_order(page);
mt = get_pageblock_migratetype(page);

/* Obey watermarks as if the page was being allocated */
watermark = low_wmark_pages(zone) + (1 << order);
if (!zone_watermark_ok(zone, 0, watermark, 0, 0))
return 0;
if (mt != MIGRATE_ISOLATE) {
/* Obey watermarks as if the page was being allocated */
watermark = low_wmark_pages(zone) + (1 << order);
if (!zone_watermark_ok(zone, 0, watermark, 0, 0))
return 0;

__mod_zone_freepage_state(zone, -(1UL << alloc_order), mt);
}

/* Remove page from free list */
list_del(&page->lru);
zone->free_area[order].nr_free--;
rmv_page_order(page);

mt = get_pageblock_migratetype(page);
if (unlikely(mt != MIGRATE_ISOLATE))
__mod_zone_freepage_state(zone, -(1UL << alloc_order), mt);

if (alloc_order != order)
expand(zone, page, alloc_order, order,
&zone->free_area[order], migratetype);
Expand Down

0 comments on commit b46e57d

Please sign in to comment.