aboutsummaryrefslogtreecommitdiffstats
path: root/mm/page_alloc.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2010-08-31 03:45:21 -0400
committerIngo Molnar <mingo@elte.hu>2010-08-31 03:45:46 -0400
commitdaab7fc734a53fdeaf844b7c03053118ad1769da (patch)
tree575deb3cdcc6dda562acaed6f7c29bc81ae01cf2 /mm/page_alloc.c
parent774ea0bcb27f57b6fd521b3b6c43237782fed4b9 (diff)
parent2bfc96a127bc1cc94d26bfaa40159966064f9c8c (diff)
Merge commit 'v2.6.36-rc3' into x86/memblock
Conflicts: arch/x86/kernel/trampoline.c mm/memblock.c Merge reason: Resolve the conflicts, update to latest upstream. Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'mm/page_alloc.c')
-rw-r--r--mm/page_alloc.c33
1 files changed, 21 insertions, 12 deletions
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index f2cd7450fa76..768ea486df58 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -1739,7 +1739,7 @@ __alloc_pages_may_oom(gfp_t gfp_mask, unsigned int order,
1739 struct page *page; 1739 struct page *page;
1740 1740
1741 /* Acquire the OOM killer lock for the zones in zonelist */ 1741 /* Acquire the OOM killer lock for the zones in zonelist */
1742 if (!try_set_zone_oom(zonelist, gfp_mask)) { 1742 if (!try_set_zonelist_oom(zonelist, gfp_mask)) {
1743 schedule_timeout_uninterruptible(1); 1743 schedule_timeout_uninterruptible(1);
1744 return NULL; 1744 return NULL;
1745 } 1745 }
@@ -1760,6 +1760,9 @@ __alloc_pages_may_oom(gfp_t gfp_mask, unsigned int order,
1760 /* The OOM killer will not help higher order allocs */ 1760 /* The OOM killer will not help higher order allocs */
1761 if (order > PAGE_ALLOC_COSTLY_ORDER) 1761 if (order > PAGE_ALLOC_COSTLY_ORDER)
1762 goto out; 1762 goto out;
1763 /* The OOM killer does not needlessly kill tasks for lowmem */
1764 if (high_zoneidx < ZONE_NORMAL)
1765 goto out;
1763 /* 1766 /*
1764 * GFP_THISNODE contains __GFP_NORETRY and we never hit this. 1767 * GFP_THISNODE contains __GFP_NORETRY and we never hit this.
1765 * Sanity check for bare calls of __GFP_THISNODE, not real OOM. 1768 * Sanity check for bare calls of __GFP_THISNODE, not real OOM.
@@ -2053,15 +2056,23 @@ rebalance:
2053 if (page) 2056 if (page)
2054 goto got_pg; 2057 goto got_pg;
2055 2058
2056 /* 2059 if (!(gfp_mask & __GFP_NOFAIL)) {
2057 * The OOM killer does not trigger for high-order 2060 /*
2058 * ~__GFP_NOFAIL allocations so if no progress is being 2061 * The oom killer is not called for high-order
2059 * made, there are no other options and retrying is 2062 * allocations that may fail, so if no progress
2060 * unlikely to help. 2063 * is being made, there are no other options and
2061 */ 2064 * retrying is unlikely to help.
2062 if (order > PAGE_ALLOC_COSTLY_ORDER && 2065 */
2063 !(gfp_mask & __GFP_NOFAIL)) 2066 if (order > PAGE_ALLOC_COSTLY_ORDER)
2064 goto nopage; 2067 goto nopage;
2068 /*
2069 * The oom killer is not called for lowmem
2070 * allocations to prevent needlessly killing
2071 * innocent tasks.
2072 */
2073 if (high_zoneidx < ZONE_NORMAL)
2074 goto nopage;
2075 }
2065 2076
2066 goto restart; 2077 goto restart;
2067 } 2078 }
@@ -4105,8 +4116,6 @@ static void __paginginit free_area_init_core(struct pglist_data *pgdat,
4105 zone_seqlock_init(zone); 4116 zone_seqlock_init(zone);
4106 zone->zone_pgdat = pgdat; 4117 zone->zone_pgdat = pgdat;
4107 4118
4108 zone->prev_priority = DEF_PRIORITY;
4109
4110 zone_pcp_init(zone); 4119 zone_pcp_init(zone);
4111 for_each_lru(l) { 4120 for_each_lru(l) {
4112 INIT_LIST_HEAD(&zone->lru[l].list); 4121 INIT_LIST_HEAD(&zone->lru[l].list);