From mboxrd@z Thu Jan 1 00:00:00 1970 Message-Id: <20070806103658.356795000@chello.nl> References: <20070806102922.907530000@chello.nl> Date: Mon, 06 Aug 2007 12:29:25 +0200 From: Peter Zijlstra Subject: [PATCH 03/10] mm: tag reseve pages Content-Disposition: inline; filename=page_alloc-reserve.patch Sender: owner-linux-mm@kvack.org Return-Path: To: linux-kernel@vger.kernel.org, linux-mm@kvack.org Cc: Peter Zijlstra , David Miller , Andrew Morton , Daniel Phillips , Pekka Enberg , Christoph Lameter , Matt Mackall , Lee Schermerhorn , Steve Dickson List-ID: Tag pages allocated from the reserves with a non-zero page->reserve. Signed-off-by: Peter Zijlstra --- include/linux/mm_types.h | 1 + mm/page_alloc.c | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) Index: linux-2.6-2/include/linux/mm_types.h =================================================================== --- linux-2.6-2.orig/include/linux/mm_types.h +++ linux-2.6-2/include/linux/mm_types.h @@ -60,6 +60,7 @@ struct page { union { pgoff_t index; /* Our offset within mapping. */ void *freelist; /* SLUB: freelist req. slab lock */ + int reserve; /* page_alloc: page is a reserve page */ }; struct list_head lru; /* Pageout list, eg. active_list * protected by zone->lru_lock ! Index: linux-2.6-2/mm/page_alloc.c =================================================================== --- linux-2.6-2.orig/mm/page_alloc.c +++ linux-2.6-2/mm/page_alloc.c @@ -1186,8 +1186,10 @@ zonelist_scan: } page = buffered_rmqueue(zonelist, zone, order, gfp_mask); - if (page) + if (page) { + page->reserve = (alloc_flags & ALLOC_NO_WATERMARKS); break; + } this_zone_full: if (NUMA_BUILD) zlc_mark_zone_full(zonelist, z); -- -- 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: email@kvack.org