Re: [patch 1/3] slob: rework freelist handling

Christoph Lameter
2007-05-23T05:06:56Z

On Wed, 23 May 2007, Nick Piggin wrote:

> Is there a patch for it? Turning on CONFIG_SLUB_DEBUG doesn't seem like
> a good idea when trying to make a comparison.

CONFIG_SLUB_DEBUG does not turn on debugging and should be on always. This
is not SLAB.

Here is the fix:

---
mm/slub.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Index: slub/mm/slub.c
===================================================================
--- slub.orig/mm/slub.c 2007-05-21 11:21:36.000000000 -0700
+++ slub/mm/slub.c 2007-05-21 11:21:49.000000000 -0700
@@ -1943,7 +1943,6 @@ static int calculate_sizes(struct kmem_c
*/
s->inuse = size;

-#ifdef CONFIG_SLUB_DEBUG
if (((flags & (SLAB_DESTROY_BY_RCU | SLAB_POISON)) ||
s->ctor)) {
/*
@@ -1958,6 +1957,7 @@ static int calculate_sizes(struct kmem_c
size += sizeof(void *);
}

+#ifdef CONFIG_SLUB_DEBUG
if (flags & SLAB_STORE_USER)
/*
* Need to store information about allocs and frees after