Commit 70a3d06e authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] enable slab debugging for larger objects

Some of the fancier slab debugging options are disabled for caches whose
objects are larger than PAGE_SIZE/8, for speed/fragmentation reasons.

But this patch turns up bugs in the size-2048 slab, so it was a bad idea.
Enable the debugging for slabs up to 4096 bytes.
parent 8cf04c0a
......@@ -949,7 +949,7 @@ kmem_cache_create (const char *name, size_t size, size_t offset,
* with object sizes just above a power of two have a significant
* amount of internal fragmentation
*/
if ((size < (PAGE_SIZE>>3) || fls(size-1) == fls(size-1+3*BYTES_PER_WORD))
if ((size < 4096 || fls(size-1) == fls(size-1+3*BYTES_PER_WORD))
&& !(flags & SLAB_MUST_HWCACHE_ALIGN)) {
flags |= SLAB_RED_ZONE|SLAB_STORE_USER;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment