]> git.ipfire.org Git - people/teissler/ipfire-2.x.git/blob - src/patches/suse-2.6.27.31/patches.suse/SoN-12-global-ALLOC_NO_WATERMARKS.patch
Merge branch 'master' of git://git.ipfire.org/ipfire-2.x
[people/teissler/ipfire-2.x.git] / src / patches / suse-2.6.27.31 / patches.suse / SoN-12-global-ALLOC_NO_WATERMARKS.patch
1 From: Peter Zijlstra <a.p.zijlstra@chello.nl>
2 Subject: mm: system wide ALLOC_NO_WATERMARK
3 Patch-mainline: No
4 References: FATE#303834
5
6 The reserve is proportionally distributed over all (!highmem) zones in the
7 system. So we need to allow an emergency allocation access to all zones. In
8 order to do that we need to break out of any mempolicy boundaries we might
9 have.
10
11 In my opinion that does not break mempolicies as those are user oriented
12 and not system oriented. That is, system allocations are not guaranteed to be
13 within mempolicy boundaries. For instance IRQs don't even have a mempolicy.
14
15 So breaking out of mempolicy boundaries for 'rare' emergency allocations,
16 which are always system allocations (as opposed to user) is ok.
17
18 Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
19 Acked-by: Neil Brown <neilb@suse.de>
20 Acked-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 @@ -1566,6 +1566,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);