aboutsummaryrefslogtreecommitdiffstats
path: root/mm/slab.c
diff options
context:
space:
mode:
Diffstat (limited to 'mm/slab.c')
-rw-r--r--mm/slab.c20
1 files changed, 0 insertions, 20 deletions
diff --git a/mm/slab.c b/mm/slab.c
index e1790e56fd86..2c3a2e0394db 100644
--- a/mm/slab.c
+++ b/mm/slab.c
@@ -2337,22 +2337,6 @@ __kmem_cache_create (struct kmem_cache *cachep, unsigned long flags)
2337 size &= ~(BYTES_PER_WORD - 1); 2337 size &= ~(BYTES_PER_WORD - 1);
2338 } 2338 }
2339 2339
2340 /* calculate the final buffer alignment: */
2341
2342 /* 1) arch recommendation: can be overridden for debug */
2343 if (flags & SLAB_HWCACHE_ALIGN) {
2344 /*
2345 * Default alignment: as specified by the arch code. Except if
2346 * an object is really small, then squeeze multiple objects into
2347 * one cacheline.
2348 */
2349 ralign = cache_line_size();
2350 while (size <= ralign / 2)
2351 ralign /= 2;
2352 } else {
2353 ralign = BYTES_PER_WORD;
2354 }
2355
2356 /* 2340 /*
2357 * Redzoning and user store require word alignment or possibly larger. 2341 * Redzoning and user store require word alignment or possibly larger.
2358 * Note this will be overridden by architecture or caller mandated 2342 * Note this will be overridden by architecture or caller mandated
@@ -2369,10 +2353,6 @@ __kmem_cache_create (struct kmem_cache *cachep, unsigned long flags)
2369 size &= ~(REDZONE_ALIGN - 1); 2353 size &= ~(REDZONE_ALIGN - 1);
2370 } 2354 }
2371 2355
2372 /* 2) arch mandated alignment */
2373 if (ralign < ARCH_SLAB_MINALIGN) {
2374 ralign = ARCH_SLAB_MINALIGN;
2375 }
2376 /* 3) caller mandated alignment */ 2356 /* 3) caller mandated alignment */
2377 if (ralign < cachep->align) { 2357 if (ralign < cachep->align) {
2378 ralign = cachep->align; 2358 ralign = cachep->align;