]> git.ipfire.org Git - people/teissler/ipfire-2.x.git/blame - src/patches/suse-2.6.27.31/patches.suse/SoN-12-global-ALLOC_NO_WATERMARKS.patch
Move xen patchset to new version's subdir.
[people/teissler/ipfire-2.x.git] / src / patches / suse-2.6.27.31 / patches.suse / SoN-12-global-ALLOC_NO_WATERMARKS.patch
CommitLineData
00e5a55c
BS
1From: Peter Zijlstra <a.p.zijlstra@chello.nl>
2Subject: mm: system wide ALLOC_NO_WATERMARK
3Patch-mainline: No
4References: FATE#303834
5
6The reserve is proportionally distributed over all (!highmem) zones in the
7system. So we need to allow an emergency allocation access to all zones. In
8order to do that we need to break out of any mempolicy boundaries we might
9have.
10
11In my opinion that does not break mempolicies as those are user oriented
12and not system oriented. That is, system allocations are not guaranteed to be
13within mempolicy boundaries. For instance IRQs don't even have a mempolicy.
14
15So breaking out of mempolicy boundaries for 'rare' emergency allocations,
16which are always system allocations (as opposed to user) is ok.
17
18Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
19Acked-by: Neil Brown <neilb@suse.de>
20Acked-by: Suresh Jayaraman <sjayaraman@suse.de>
21
22---
23 mm/page_alloc.c | 5 +++++
24 1 file changed, 5 insertions(+)
25
26--- a/mm/page_alloc.c
27+++ b/mm/page_alloc.c
28@@ -1561,6 +1561,11 @@ restart:
29 rebalance:
30 if (alloc_flags & ALLOC_NO_WATERMARKS) {
31 nofail_alloc:
32+ /*
33+ * break out of mempolicy boundaries
34+ */
35+ zonelist = node_zonelist(numa_node_id(), gfp_mask);
36+
37 /* go through the zonelist yet again, ignoring mins */
38 page = get_page_from_freelist(gfp_mask, nodemask, order,
39 zonelist, high_zoneidx, ALLOC_NO_WATERMARKS);