diff options
author | Ingo Molnar <mingo@elte.hu> | 2009-06-01 10:01:03 +0200 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-06-01 10:01:39 +0200 |
commit | 23db9f430be9325a861c7762c1ffadad9ca528a8 (patch) | |
tree | 1ebb681611c96f17aa4f96e28d6923824a8b210f /mm/slub.c | |
parent | 27b9613b7be39412775d0ab80f57229aa73bb07d (diff) | |
parent | 3218911f839b6c85acbf872ad264ea69aa4d89ad (diff) | |
download | linux-23db9f430be9325a861c7762c1ffadad9ca528a8.tar.bz2 |
Merge branch 'linus' into perfcounters/core
Merge reason: merge almost-rc8 into perfcounters/core, which was -rc6
based - to pick up the latest upstream fixes.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'mm/slub.c')
-rw-r--r-- | mm/slub.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/mm/slub.c b/mm/slub.c index 7ab54ecbd3f3..65ffda5934b0 100644 --- a/mm/slub.c +++ b/mm/slub.c @@ -9,6 +9,7 @@ */ #include <linux/mm.h> +#include <linux/swap.h> /* struct reclaim_state */ #include <linux/module.h> #include <linux/bit_spinlock.h> #include <linux/interrupt.h> @@ -1170,6 +1171,8 @@ static void __free_slab(struct kmem_cache *s, struct page *page) __ClearPageSlab(page); reset_page_mapcount(page); + if (current->reclaim_state) + current->reclaim_state->reclaimed_slab += pages; __free_pages(page, order); } @@ -1909,7 +1912,7 @@ static inline int calculate_order(int size) * Doh this slab cannot be placed using slub_max_order. */ order = slab_order(size, 1, MAX_ORDER, 1); - if (order <= MAX_ORDER) + if (order < MAX_ORDER) return order; return -ENOSYS; } @@ -2522,6 +2525,7 @@ __setup("slub_min_order=", setup_slub_min_order); static int __init setup_slub_max_order(char *str) { get_option(&str, &slub_max_order); + slub_max_order = min(slub_max_order, MAX_ORDER - 1); return 1; } |