aboutsummaryrefslogtreecommitdiffstats
path: root/mm/page_alloc.c
diff options
context:
space:
mode:
Diffstat (limited to 'mm/page_alloc.c')
-rw-r--r--mm/page_alloc.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 6849e870de54..9a7aaae07ab4 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -556,8 +556,9 @@ static void free_pcppages_bulk(struct zone *zone, int count,
556 page = list_entry(list->prev, struct page, lru); 556 page = list_entry(list->prev, struct page, lru);
557 /* must delete as __free_one_page list manipulates */ 557 /* must delete as __free_one_page list manipulates */
558 list_del(&page->lru); 558 list_del(&page->lru);
559 __free_one_page(page, zone, 0, migratetype); 559 /* MIGRATE_MOVABLE list may include MIGRATE_RESERVEs */
560 trace_mm_page_pcpu_drain(page, 0, migratetype); 560 __free_one_page(page, zone, 0, page_private(page));
561 trace_mm_page_pcpu_drain(page, 0, page_private(page));
561 } while (--count && --batch_free && !list_empty(list)); 562 } while (--count && --batch_free && !list_empty(list));
562 } 563 }
563 spin_unlock(&zone->lock); 564 spin_unlock(&zone->lock);
@@ -1219,10 +1220,10 @@ again:
1219 } 1220 }
1220 spin_lock_irqsave(&zone->lock, flags); 1221 spin_lock_irqsave(&zone->lock, flags);
1221 page = __rmqueue(zone, order, migratetype); 1222 page = __rmqueue(zone, order, migratetype);
1222 __mod_zone_page_state(zone, NR_FREE_PAGES, -(1 << order));
1223 spin_unlock(&zone->lock); 1223 spin_unlock(&zone->lock);
1224 if (!page) 1224 if (!page)
1225 goto failed; 1225 goto failed;
1226 __mod_zone_page_state(zone, NR_FREE_PAGES, -(1 << order));
1226 } 1227 }
1227 1228
1228 __count_zone_vm_events(PGALLOC, zone, 1 << order); 1229 __count_zone_vm_events(PGALLOC, zone, 1 << order);
@@ -3937,7 +3938,7 @@ void __init add_active_range(unsigned int nid, unsigned long start_pfn,
3937 } 3938 }
3938 3939
3939 /* Merge backward if suitable */ 3940 /* Merge backward if suitable */
3940 if (start_pfn < early_node_map[i].end_pfn && 3941 if (start_pfn < early_node_map[i].start_pfn &&
3941 end_pfn >= early_node_map[i].start_pfn) { 3942 end_pfn >= early_node_map[i].start_pfn) {
3942 early_node_map[i].start_pfn = start_pfn; 3943 early_node_map[i].start_pfn = start_pfn;
3943 return; 3944 return;