diff options
Diffstat (limited to 'mm')
-rw-r--r-- | mm/slab.c | 19 |
1 files changed, 2 insertions, 17 deletions
@@ -569,21 +569,6 @@ static void **dbg_userword(struct kmem_cache *cachep, void *objp) | |||
569 | #endif | 569 | #endif |
570 | 570 | ||
571 | /* | 571 | /* |
572 | * Maximum size of an obj (in 2^order pages) and absolute limit for the gfp | ||
573 | * order. | ||
574 | */ | ||
575 | #if defined(CONFIG_LARGE_ALLOCS) | ||
576 | #define MAX_OBJ_ORDER 13 /* up to 32Mb */ | ||
577 | #define MAX_GFP_ORDER 13 /* up to 32Mb */ | ||
578 | #elif defined(CONFIG_MMU) | ||
579 | #define MAX_OBJ_ORDER 5 /* 32 pages */ | ||
580 | #define MAX_GFP_ORDER 5 /* 32 pages */ | ||
581 | #else | ||
582 | #define MAX_OBJ_ORDER 8 /* up to 1Mb */ | ||
583 | #define MAX_GFP_ORDER 8 /* up to 1Mb */ | ||
584 | #endif | ||
585 | |||
586 | /* | ||
587 | * Do not go above this order unless 0 objects fit into the slab. | 572 | * Do not go above this order unless 0 objects fit into the slab. |
588 | */ | 573 | */ |
589 | #define BREAK_GFP_ORDER_HI 1 | 574 | #define BREAK_GFP_ORDER_HI 1 |
@@ -2002,7 +1987,7 @@ static size_t calculate_slab_order(struct kmem_cache *cachep, | |||
2002 | size_t left_over = 0; | 1987 | size_t left_over = 0; |
2003 | int gfporder; | 1988 | int gfporder; |
2004 | 1989 | ||
2005 | for (gfporder = 0; gfporder <= MAX_GFP_ORDER; gfporder++) { | 1990 | for (gfporder = 0; gfporder <= KMALLOC_MAX_ORDER; gfporder++) { |
2006 | unsigned int num; | 1991 | unsigned int num; |
2007 | size_t remainder; | 1992 | size_t remainder; |
2008 | 1993 | ||
@@ -2148,7 +2133,7 @@ kmem_cache_create (const char *name, size_t size, size_t align, | |||
2148 | * Sanity checks... these are all serious usage bugs. | 2133 | * Sanity checks... these are all serious usage bugs. |
2149 | */ | 2134 | */ |
2150 | if (!name || in_interrupt() || (size < BYTES_PER_WORD) || | 2135 | if (!name || in_interrupt() || (size < BYTES_PER_WORD) || |
2151 | (size > (1 << MAX_OBJ_ORDER) * PAGE_SIZE) || dtor) { | 2136 | size > KMALLOC_MAX_SIZE || dtor) { |
2152 | printk(KERN_ERR "%s: Early error in slab %s\n", __FUNCTION__, | 2137 | printk(KERN_ERR "%s: Early error in slab %s\n", __FUNCTION__, |
2153 | name); | 2138 | name); |
2154 | BUG(); | 2139 | BUG(); |