diff options
author | Mel Gorman <mgorman@suse.de> | 2012-07-31 19:44:12 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-07-31 21:42:45 -0400 |
commit | 183f6371aac2a5496a8ef2b0b0a68562652c3cdb (patch) | |
tree | 1c265a292ca79410a820168fbd0b5636ab4596f8 /mm | |
parent | cfd19c5a9ecf8e5e38de2603077c4330af21316e (diff) |
mm: ignore mempolicies when using ALLOC_NO_WATERMARK
The reserve is proportionally distributed over all !highmem zones in the
system. So we need to allow an emergency allocation access to all zones.
In order to do that we need to break out of any mempolicy boundaries we
might have.
In my opinion that does not break mempolicies as those are user oriented
and not system oriented. That is, system allocations are not guaranteed
to be within mempolicy boundaries. For instance IRQs do not even have a
mempolicy.
So breaking out of mempolicy boundaries for 'rare' emergency allocations,
which are always system allocations (as opposed to user) is ok.
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Mel Gorman <mgorman@suse.de>
Cc: David Miller <davem@davemloft.net>
Cc: Neil Brown <neilb@suse.de>
Cc: Mike Christie <michaelc@cs.wisc.edu>
Cc: Eric B Munson <emunson@mgebm.net>
Cc: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Sebastian Andrzej Siewior <sebastian@breakpoint.cc>
Cc: Mel Gorman <mgorman@suse.de>
Cc: Christoph Lameter <cl@linux.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm')
-rw-r--r-- | mm/page_alloc.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/mm/page_alloc.c b/mm/page_alloc.c index f9d925451bfd..ef2d1e72fc07 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c | |||
@@ -2378,6 +2378,13 @@ rebalance: | |||
2378 | 2378 | ||
2379 | /* Allocate without watermarks if the context allows */ | 2379 | /* Allocate without watermarks if the context allows */ |
2380 | if (alloc_flags & ALLOC_NO_WATERMARKS) { | 2380 | if (alloc_flags & ALLOC_NO_WATERMARKS) { |
2381 | /* | ||
2382 | * Ignore mempolicies if ALLOC_NO_WATERMARKS on the grounds | ||
2383 | * the allocation is high priority and these type of | ||
2384 | * allocations are system rather than user orientated | ||
2385 | */ | ||
2386 | zonelist = node_zonelist(numa_node_id(), gfp_mask); | ||
2387 | |||
2381 | page = __alloc_pages_high_priority(gfp_mask, order, | 2388 | page = __alloc_pages_high_priority(gfp_mask, order, |
2382 | zonelist, high_zoneidx, nodemask, | 2389 | zonelist, high_zoneidx, nodemask, |
2383 | preferred_zone, migratetype); | 2390 | preferred_zone, migratetype); |