Tag pages allocated from the reserves with a non-zero page->reserve.
This allows us to distinguish and account reserve pages.
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
---
include/linux/mm_types.h | 1 +
mm/page_alloc.c | 4 +++-
2 files changed, 4 insertions(+), 1 deletion(-)
Index: linux-2.6/include/linux/mm_types.h
===================================================================
--- linux-2.6.orig/include/linux/mm_types.h
+++ linux-2.6/include/linux/mm_types.h
@@ -70,6 +70,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/mm/page_alloc.c
===================================================================
--- linux-2.6.orig/mm/page_alloc.c
+++ linux-2.6/mm/page_alloc.c
@@ -1433,8 +1433,10 @@ zonelist_scan:
}
page = buffered_rmqueue(preferred_zone, 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);
--
--
| jmerkey | [ANNOUNCE] Merkey's Kernel Debugger |
| Bart Van Assche | Integration of SCST in the mainstream Linux kernel |
| Linus Torvalds | Linux 2.6.27-rc8 |
| Harald Dunkel | 2.6.25.3: su gets stuck for root |
git: | |
| Peter Stahlir | Git as a filesystem |
| Linus Torvalds | Help with a tcl/tk gui thing.. |
| Jon Smirl | ! [rejected] master -> master (non-fast forward) |
| Wink Saville | Resolving conflicts |
| Kevin Neff | Patching a SSH 'Weakness' |
| Mayuresh Kathe | Re: What is our ultimate goal?? |
| Doug Fordham | Re: Real men don't attack straw men |
| GVG GVG | ssh_exchange_identification: Connection closed by remote host |
| David Miller | [GIT]: Networking |
| Jarek Poplawski | [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| Eric Dumazet | Re: [PATCH] net: implement emergency route cache rebulds when gc_elasticity is exc... |
| Arnaldo Carvalho de Melo | Re: [PATCH 2/6] Phonet: connected sockets glue |
