Re: CONFIG_DEBUG_SLAB_LEAK omits size-4096 and larger?

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: J. Bruce Fields
Date: Wednesday, June 11, 2008 - 1:57 pm

On Wed, Jun 11, 2008 at 04:09:47PM -0400, Jeff Layton wrote:

Ah, I missed that!  I'm a little confused as to how those flags behavior
affect the collection of the leak debugging data, but I can verify that
the below does result in size-4096 showing up in /proc/slab_allocators;
hopefully there's no more negative result than the performance penalty.

Norman, do you think you could try applying this and then trying again?

--b.


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 < 8192 || 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))
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
CONFIG_DEBUG_SLAB_LEAK omits size-4096 and larger?, J. Bruce Fields, (Wed Jun 11, 12:52 pm)
Re: CONFIG_DEBUG_SLAB_LEAK omits size-4096 and larger?, Jeff Layton, (Wed Jun 11, 1:09 pm)
Re: CONFIG_DEBUG_SLAB_LEAK omits size-4096 and larger?, J. Bruce Fields, (Wed Jun 11, 1:57 pm)
RE: CONFIG_DEBUG_SLAB_LEAK omits size-4096 and larger?, Weathers, Norman R., (Wed Jun 11, 3:46 pm)
Re: CONFIG_DEBUG_SLAB_LEAK omits size-4096 and larger?, J. Bruce Fields, (Wed Jun 11, 3:54 pm)
RE: CONFIG_DEBUG_SLAB_LEAK omits size-4096 and larger?, Weathers, Norman R., (Thu Jun 12, 12:54 pm)
Re: CONFIG_DEBUG_SLAB_LEAK omits size-4096 and larger?, J. Bruce Fields, (Fri Jun 13, 1:15 pm)
RE: CONFIG_DEBUG_SLAB_LEAK omits size-4096 and larger?, Weathers, Norman R., (Fri Jun 13, 2:53 pm)
Re: CONFIG_DEBUG_SLAB_LEAK omits size-4096 and larger?, J. Bruce Fields, (Fri Jun 13, 3:04 pm)
RE: CONFIG_DEBUG_SLAB_LEAK omits size-4096 and larger?, Weathers, Norman R., (Fri Jun 13, 3:53 pm)
Re: CONFIG_DEBUG_SLAB_LEAK omits size-4096 and larger?, J. Bruce Fields, (Mon Jun 16, 10:43 am)
RE: CONFIG_DEBUG_SLAB_LEAK omits size-4096 and larger?, Weathers, Norman R., (Thu Jun 19, 8:53 am)
Re: CONFIG_DEBUG_SLAB_LEAK omits size-4096 and larger?, J. Bruce Fields, (Thu Jun 19, 11:46 am)