aboutsummaryrefslogtreecommitdiffstats
path: root/mm/slab.c
diff options
context:
space:
mode:
authorDavid Rientjes <rientjes@google.com>2011-10-19 01:09:24 -0400
committerPekka Enberg <penberg@kernel.org>2011-11-10 14:25:30 -0500
commit543585cc5b07fa99a2dc897159fbf48c1eb73058 (patch)
tree2cdc47c37602aeb4cb0efed55e1a0b7914f025d9 /mm/slab.c
parent1ea6b8f48918282bdca0b32a34095504ee65bab5 (diff)
slab: rename slab_break_gfp_order to slab_max_order
slab_break_gfp_order is more appropriately named slab_max_order since it enforces the maximum order size of slabs as long as a single object will still fit. Also rename BREAK_GFP_ORDER_{LO,HI} accordingly. Acked-by: Christoph Lameter <cl@linux.com> Signed-off-by: David Rientjes <rientjes@google.com> Signed-off-by: Pekka Enberg <penberg@kernel.org>
Diffstat (limited to 'mm/slab.c')
-rw-r--r--mm/slab.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/mm/slab.c b/mm/slab.c
index 708efe886154..1a482e8402c4 100644
--- a/mm/slab.c
+++ b/mm/slab.c
@@ -481,9 +481,9 @@ EXPORT_SYMBOL(slab_buffer_size);
481/* 481/*
482 * Do not go above this order unless 0 objects fit into the slab. 482 * Do not go above this order unless 0 objects fit into the slab.
483 */ 483 */
484#define BREAK_GFP_ORDER_HI 1 484#define SLAB_MAX_ORDER_HI 1
485#define BREAK_GFP_ORDER_LO 0 485#define SLAB_MAX_ORDER_LO 0
486static int slab_break_gfp_order = BREAK_GFP_ORDER_LO; 486static int slab_max_order = SLAB_MAX_ORDER_LO;
487 487
488/* 488/*
489 * Functions for storing/retrieving the cachep and or slab from the page 489 * Functions for storing/retrieving the cachep and or slab from the page
@@ -1502,7 +1502,7 @@ void __init kmem_cache_init(void)
1502 * page orders on machines with more than 32MB of memory. 1502 * page orders on machines with more than 32MB of memory.
1503 */ 1503 */
1504 if (totalram_pages > (32 << 20) >> PAGE_SHIFT) 1504 if (totalram_pages > (32 << 20) >> PAGE_SHIFT)
1505 slab_break_gfp_order = BREAK_GFP_ORDER_HI; 1505 slab_max_order = SLAB_MAX_ORDER_HI;
1506 1506
1507 /* Bootstrap is tricky, because several objects are allocated 1507 /* Bootstrap is tricky, because several objects are allocated
1508 * from caches that do not exist yet: 1508 * from caches that do not exist yet:
@@ -2112,7 +2112,7 @@ static size_t calculate_slab_order(struct kmem_cache *cachep,
2112 * Large number of objects is good, but very large slabs are 2112 * Large number of objects is good, but very large slabs are
2113 * currently bad for the gfp()s. 2113 * currently bad for the gfp()s.
2114 */ 2114 */
2115 if (gfporder >= slab_break_gfp_order) 2115 if (gfporder >= slab_max_order)
2116 break; 2116 break;
2117 2117
2118 /* 2118 /*