* [09/31] mm: system wide ALLOC_NO_WATERMARK
@ 2009-10-01 14:06 Suresh Jayaraman
0 siblings, 0 replies; only message in thread
From: Suresh Jayaraman @ 2009-10-01 14:06 UTC (permalink / raw)
To: Linus Torvalds, Andrew Morton, linux-kernel, linux-mm
Cc: netdev, Neil Brown, Miklos Szeredi, Wouter Verhelst,
Peter Zijlstra, trond.myklebust, Suresh Jayaraman
From: Peter Zijlstra <a.p.zijlstra@chello.nl>
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 don't 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: Suresh Jayaraman <sjayaraman@suse.de>
---
mm/page_alloc.c | 5 +++++
1 file changed, 5 insertions(+)
Index: mmotm/mm/page_alloc.c
===================================================================
--- mmotm.orig/mm/page_alloc.c
+++ mmotm/mm/page_alloc.c
@@ -1775,6 +1775,11 @@ restart:
rebalance:
/* Allocate without watermarks if the context allows */
if (alloc_flags & ALLOC_NO_WATERMARKS) {
+ /*
+ * break out mempolicy boundaries
+ */
+ zonelist = node_zonelist(numa_node_id(), gfp_mask);
+
page = __alloc_pages_high_priority(gfp_mask, order,
zonelist, high_zoneidx, nodemask,
preferred_zone, migratetype);
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2009-10-01 14:06 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-01 14:06 [09/31] mm: system wide ALLOC_NO_WATERMARK Suresh Jayaraman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).