diff options
Diffstat (limited to 'mm/page_alloc.c')
-rw-r--r-- | mm/page_alloc.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 40954fb81598..3da85b81dabb 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c | |||
@@ -726,7 +726,7 @@ static void __drain_pages(unsigned int cpu) | |||
726 | } | 726 | } |
727 | } | 727 | } |
728 | 728 | ||
729 | #ifdef CONFIG_PM | 729 | #ifdef CONFIG_HIBERNATION |
730 | 730 | ||
731 | void mark_free_pages(struct zone *zone) | 731 | void mark_free_pages(struct zone *zone) |
732 | { | 732 | { |
@@ -772,7 +772,7 @@ void drain_local_pages(void) | |||
772 | __drain_pages(smp_processor_id()); | 772 | __drain_pages(smp_processor_id()); |
773 | local_irq_restore(flags); | 773 | local_irq_restore(flags); |
774 | } | 774 | } |
775 | #endif /* CONFIG_PM */ | 775 | #endif /* CONFIG_HIBERNATION */ |
776 | 776 | ||
777 | /* | 777 | /* |
778 | * Free a 0-order page | 778 | * Free a 0-order page |
@@ -1350,6 +1350,10 @@ nofail_alloc: | |||
1350 | if (page) | 1350 | if (page) |
1351 | goto got_pg; | 1351 | goto got_pg; |
1352 | 1352 | ||
1353 | /* The OOM killer will not help higher order allocs so fail */ | ||
1354 | if (order > PAGE_ALLOC_COSTLY_ORDER) | ||
1355 | goto nopage; | ||
1356 | |||
1353 | out_of_memory(zonelist, gfp_mask, order); | 1357 | out_of_memory(zonelist, gfp_mask, order); |
1354 | goto restart; | 1358 | goto restart; |
1355 | } | 1359 | } |
@@ -2775,11 +2779,11 @@ unsigned long __meminit __absent_pages_in_range(int nid, | |||
2775 | if (i == -1) | 2779 | if (i == -1) |
2776 | return 0; | 2780 | return 0; |
2777 | 2781 | ||
2782 | prev_end_pfn = min(early_node_map[i].start_pfn, range_end_pfn); | ||
2783 | |||
2778 | /* Account for ranges before physical memory on this node */ | 2784 | /* Account for ranges before physical memory on this node */ |
2779 | if (early_node_map[i].start_pfn > range_start_pfn) | 2785 | if (early_node_map[i].start_pfn > range_start_pfn) |
2780 | hole_pages = early_node_map[i].start_pfn - range_start_pfn; | 2786 | hole_pages = prev_end_pfn - range_start_pfn; |
2781 | |||
2782 | prev_end_pfn = early_node_map[i].start_pfn; | ||
2783 | 2787 | ||
2784 | /* Find all holes for the zone within the node */ | 2788 | /* Find all holes for the zone within the node */ |
2785 | for (; i != -1; i = next_active_region_index_in_nid(i, nid)) { | 2789 | for (; i != -1; i = next_active_region_index_in_nid(i, nid)) { |