aboutsummaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2009-02-20 06:15:30 -0500
committerIngo Molnar <mingo@elte.hu>2009-02-20 06:15:30 -0500
commit057685cf57066bc8aaed68de1b1970e12f0075d2 (patch)
treee7fea68e7080d6366b45775028bfbdf6237ecda5 /mm
parent64b36ca7f408e0bd45487c8c28f168f11f3b6dcd (diff)
parentfe1200b63d158b28eef6d4de1e5b5f99c681ba2f (diff)
Merge branch 'for-ingo' of git://git.kernel.org/pub/scm/linux/kernel/git/penberg/slab-2.6 into tracing/kmemtrace
Conflicts: mm/slub.c
Diffstat (limited to 'mm')
-rw-r--r--mm/slub.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/mm/slub.c b/mm/slub.c
index 3525e7b21d1..6de5e07c885 100644
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -2506,7 +2506,7 @@ EXPORT_SYMBOL(kmem_cache_destroy);
2506 * Kmalloc subsystem 2506 * Kmalloc subsystem
2507 *******************************************************************/ 2507 *******************************************************************/
2508 2508
2509struct kmem_cache kmalloc_caches[PAGE_SHIFT + 1] __cacheline_aligned; 2509struct kmem_cache kmalloc_caches[SLUB_PAGE_SHIFT] __cacheline_aligned;
2510EXPORT_SYMBOL(kmalloc_caches); 2510EXPORT_SYMBOL(kmalloc_caches);
2511 2511
2512static int __init setup_slub_min_order(char *str) 2512static int __init setup_slub_min_order(char *str)
@@ -2568,7 +2568,7 @@ panic:
2568} 2568}
2569 2569
2570#ifdef CONFIG_ZONE_DMA 2570#ifdef CONFIG_ZONE_DMA
2571static struct kmem_cache *kmalloc_caches_dma[PAGE_SHIFT + 1]; 2571static struct kmem_cache *kmalloc_caches_dma[SLUB_PAGE_SHIFT];
2572 2572
2573static void sysfs_add_func(struct work_struct *w) 2573static void sysfs_add_func(struct work_struct *w)
2574{ 2574{
@@ -2690,7 +2690,7 @@ void *__kmalloc(size_t size, gfp_t flags)
2690 struct kmem_cache *s; 2690 struct kmem_cache *s;
2691 void *ret; 2691 void *ret;
2692 2692
2693 if (unlikely(size > PAGE_SIZE)) 2693 if (unlikely(size > SLUB_MAX_SIZE))
2694 return kmalloc_large(size, flags); 2694 return kmalloc_large(size, flags);
2695 2695
2696 s = get_slab(size, flags); 2696 s = get_slab(size, flags);
@@ -2724,7 +2724,7 @@ void *__kmalloc_node(size_t size, gfp_t flags, int node)
2724 struct kmem_cache *s; 2724 struct kmem_cache *s;
2725 void *ret; 2725 void *ret;
2726 2726
2727 if (unlikely(size > PAGE_SIZE)) { 2727 if (unlikely(size > SLUB_MAX_SIZE)) {
2728 ret = kmalloc_large_node(size, flags, node); 2728 ret = kmalloc_large_node(size, flags, node);
2729 2729
2730 kmemtrace_mark_alloc_node(KMEMTRACE_TYPE_KMALLOC, 2730 kmemtrace_mark_alloc_node(KMEMTRACE_TYPE_KMALLOC,
@@ -3039,7 +3039,7 @@ void __init kmem_cache_init(void)
3039 caches++; 3039 caches++;
3040 } 3040 }
3041 3041
3042 for (i = KMALLOC_SHIFT_LOW; i <= PAGE_SHIFT; i++) { 3042 for (i = KMALLOC_SHIFT_LOW; i < SLUB_PAGE_SHIFT; i++) {
3043 create_kmalloc_cache(&kmalloc_caches[i], 3043 create_kmalloc_cache(&kmalloc_caches[i],
3044 "kmalloc", 1 << i, GFP_KERNEL); 3044 "kmalloc", 1 << i, GFP_KERNEL);
3045 caches++; 3045 caches++;
@@ -3076,7 +3076,7 @@ void __init kmem_cache_init(void)
3076 slab_state = UP; 3076 slab_state = UP;
3077 3077
3078 /* Provide the correct kmalloc names now that the caches are up */ 3078 /* Provide the correct kmalloc names now that the caches are up */
3079 for (i = KMALLOC_SHIFT_LOW; i <= PAGE_SHIFT; i++) 3079 for (i = KMALLOC_SHIFT_LOW; i < SLUB_PAGE_SHIFT; i++)
3080 kmalloc_caches[i]. name = 3080 kmalloc_caches[i]. name =
3081 kasprintf(GFP_KERNEL, "kmalloc-%d", 1 << i); 3081 kasprintf(GFP_KERNEL, "kmalloc-%d", 1 << i);
3082 3082
@@ -3277,7 +3277,7 @@ void *__kmalloc_track_caller(size_t size, gfp_t gfpflags, unsigned long caller)
3277 struct kmem_cache *s; 3277 struct kmem_cache *s;
3278 void *ret; 3278 void *ret;
3279 3279
3280 if (unlikely(size > PAGE_SIZE)) 3280 if (unlikely(size > SLUB_MAX_SIZE))
3281 return kmalloc_large(size, gfpflags); 3281 return kmalloc_large(size, gfpflags);
3282 3282
3283 s = get_slab(size, gfpflags); 3283 s = get_slab(size, gfpflags);
@@ -3300,7 +3300,7 @@ void *__kmalloc_node_track_caller(size_t size, gfp_t gfpflags,
3300 struct kmem_cache *s; 3300 struct kmem_cache *s;
3301 void *ret; 3301 void *ret;
3302 3302
3303 if (unlikely(size > PAGE_SIZE)) 3303 if (unlikely(size > SLUB_MAX_SIZE))
3304 return kmalloc_large_node(size, gfpflags, node); 3304 return kmalloc_large_node(size, gfpflags, node);
3305 3305
3306 s = get_slab(size, gfpflags); 3306 s = get_slab(size, gfpflags);