1/3
------------------------------------------------------------------------
Keep track of the number of free pages of each order in the buddy allocator.
Signed-off-by: Nick Piggin <nickpiggin@xxxxxxxxxxxx>
---
linux-2.6-npiggin/include/linux/mmzone.h | 1 +
linux-2.6-npiggin/mm/page_alloc.c | 22 ++++++++--------------
2 files changed, 9 insertions(+), 14 deletions(-)
diff -puN mm/page_alloc.c~vm-free-order-pages mm/page_alloc.c
--- linux-2.6/mm/page_alloc.c~vm-free-order-pages 2004-09-05 14:53:53.000000000 +1000
+++ linux-2.6-npiggin/mm/page_alloc.c 2004-09-05 14:53:53.000000000 +1000
@@ -216,6 +216,7 @@ static inline void __free_pages_bulk (st
page_idx &= mask;
}
list_add(&(base + page_idx)->lru, &area->free_list);
+ area->nr_free++;
}