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

Nick Piggin
2007-05-23T05:11:52Z

On Tue, May 22, 2007 at 10:06:56PM -0700, Christoph Lameter wrote:
>
> 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.

I don't really know what you mean by this... CONFIG_SLUB_DEBUG adds 20K or
so to the kernel image if nothing else, which just makes a comparison
more difficult. But to me it seems like CONFIG_SLUB_DEBUG also puts extra
redzone in the object sometimes.

> Here is the fix:

Thanks.

>
>
>
> ---
> 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