全部博文(90)
分类: LINUX
2010-12-08 11:13:52
diff --git a/mm/slab.c b/mm/slab.c index 06236e4..b379e31 100644 --- a/mm/slab.c +++ b/mm/slab.c @@ -2202,7 +2202,7 @@ kmem_cache_create (const char *name, size_t size, size_t align, * above the next power of two: caches with object sizes just above a * power of two have a significant amount of internal fragmentation. */ - if (size < 4096 || fls(size - 1) == fls(size-1 + REDZONE_ALIGN + + if (size < 128*1024+1 || fls(size - 1) == fls(size-1 + REDZONE_ALIGN + 2 * sizeof(unsigned long long))) flags |= SLAB_RED_ZONE | SLAB_STORE_USER; if (!(flags & SLAB_DESTROY_BY_RCU))
参考资料: