diff options
author | Greg Kroah-Hartman <gregkh@suse.de> | 2011-02-17 12:56:40 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-02-17 12:56:55 -0500 |
commit | 66b0835e2bb3d345f060a47bb8c8f883bd25ec2b (patch) | |
tree | d1fc390dfa58f131df908267d87ef99d4522a596 /mm/page_alloc.c | |
parent | 479b46b5599b1e610630d7332e168c1f9c4ee0b4 (diff) | |
parent | 85e2efbb1db9a18d218006706d6e4fbeb0216213 (diff) |
Merge 2.6.38-rc5 into usb-next
This is needed to resolve some merge conflicts that were found
in the USB host controller patches, and reported by Stephen Rothwell.
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'mm/page_alloc.c')
-rw-r--r-- | mm/page_alloc.c | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 90c1439549fd..a873e61e312e 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c | |||
@@ -1088,8 +1088,10 @@ static void drain_pages(unsigned int cpu) | |||
1088 | pset = per_cpu_ptr(zone->pageset, cpu); | 1088 | pset = per_cpu_ptr(zone->pageset, cpu); |
1089 | 1089 | ||
1090 | pcp = &pset->pcp; | 1090 | pcp = &pset->pcp; |
1091 | free_pcppages_bulk(zone, pcp->count, pcp); | 1091 | if (pcp->count) { |
1092 | pcp->count = 0; | 1092 | free_pcppages_bulk(zone, pcp->count, pcp); |
1093 | pcp->count = 0; | ||
1094 | } | ||
1093 | local_irq_restore(flags); | 1095 | local_irq_restore(flags); |
1094 | } | 1096 | } |
1095 | } | 1097 | } |
@@ -2034,6 +2036,14 @@ restart: | |||
2034 | */ | 2036 | */ |
2035 | alloc_flags = gfp_to_alloc_flags(gfp_mask); | 2037 | alloc_flags = gfp_to_alloc_flags(gfp_mask); |
2036 | 2038 | ||
2039 | /* | ||
2040 | * Find the true preferred zone if the allocation is unconstrained by | ||
2041 | * cpusets. | ||
2042 | */ | ||
2043 | if (!(alloc_flags & ALLOC_CPUSET) && !nodemask) | ||
2044 | first_zones_zonelist(zonelist, high_zoneidx, NULL, | ||
2045 | &preferred_zone); | ||
2046 | |||
2037 | /* This is the last chance, in general, before the goto nopage. */ | 2047 | /* This is the last chance, in general, before the goto nopage. */ |
2038 | page = get_page_from_freelist(gfp_mask, nodemask, order, zonelist, | 2048 | page = get_page_from_freelist(gfp_mask, nodemask, order, zonelist, |
2039 | high_zoneidx, alloc_flags & ~ALLOC_NO_WATERMARKS, | 2049 | high_zoneidx, alloc_flags & ~ALLOC_NO_WATERMARKS, |
@@ -2192,7 +2202,9 @@ __alloc_pages_nodemask(gfp_t gfp_mask, unsigned int order, | |||
2192 | 2202 | ||
2193 | get_mems_allowed(); | 2203 | get_mems_allowed(); |
2194 | /* The preferred zone is used for statistics later */ | 2204 | /* The preferred zone is used for statistics later */ |
2195 | first_zones_zonelist(zonelist, high_zoneidx, nodemask, &preferred_zone); | 2205 | first_zones_zonelist(zonelist, high_zoneidx, |
2206 | nodemask ? : &cpuset_current_mems_allowed, | ||
2207 | &preferred_zone); | ||
2196 | if (!preferred_zone) { | 2208 | if (!preferred_zone) { |
2197 | put_mems_allowed(); | 2209 | put_mems_allowed(); |
2198 | return NULL; | 2210 | return NULL; |