]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blame - src/patches/suse-2.6.27.25/patches.suse/SoN-07-page_alloc-reserve.patch
Changed checkfs to auto reboot after correctable fsck fixes.
[people/pmueller/ipfire-2.x.git] / src / patches / suse-2.6.27.25 / patches.suse / SoN-07-page_alloc-reserve.patch
CommitLineData
00e5a55c
BS
1From: Peter Zijlstra <a.p.zijlstra@chello.nl>
2Subject: mm: tag reseve pages
3Patch-mainline: No
4References: FATE#303834
5
6Tag pages allocated from the reserves with a non-zero page->reserve.
7This allows us to distinguish and account reserve pages.
8
9Since low-memory situations are transient, and unrelated the the actual
10page (any page can be on the freelist when we run low), don't mark the
11page in any permanent way - just pass along the information to the
12allocatee.
13
14Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
15Acked-by: Neil Brown <neilb@suse.de>
16Acked-by: Suresh Jayaraman <sjayaraman@suse.de>
17
18---
19 include/linux/mm_types.h | 1 +
20 mm/page_alloc.c | 4 +++-
21 2 files changed, 4 insertions(+), 1 deletion(-)
22
23--- a/include/linux/mm_types.h
24+++ b/include/linux/mm_types.h
25@@ -74,6 +74,7 @@ struct page {
26 union {
27 pgoff_t index; /* Our offset within mapping. */
28 void *freelist; /* SLUB: freelist req. slab lock */
29+ int reserve; /* page_alloc: page is a reserve page */
30 };
31 struct list_head lru; /* Pageout list, eg. active_list
32 * protected by zone->lru_lock !
33--- a/mm/page_alloc.c
34+++ b/mm/page_alloc.c
35@@ -1425,8 +1425,10 @@ zonelist_scan:
36 }
37
38 page = buffered_rmqueue(preferred_zone, zone, order, gfp_mask);
39- if (page)
40+ if (page) {
41+ page->reserve = !!(alloc_flags & ALLOC_NO_WATERMARKS);
42 break;
43+ }
44 this_zone_full:
45 if (NUMA_BUILD)
46 zlc_mark_zone_full(zonelist, z);