Re: [patch] slub: use size and objsize orders to disable debug flags

Christoph Lameter
2009-08-03T14:56:50Z

Acked-by: Christoph Lameter <cl@linux-foundation.org>

On Mon, 27 Jul 2009, David Rientjes wrote:
> @@ -2488,6 +2474,18 @@ static int kmem_cache_open(struct kmem_cache *s, gfp_t gfpflags,
>
> if (!calculate_sizes(s, -1))
> goto error;
> + if (disable_higher_order_debug) {
> + /*
> + * Disable debugging flags that store metadata if the min slab
> + * order increased.
> + */
> + if (get_order(s->size) > get_order(s->objsize)) {
> + s->flags &= ~DEBUG_METADATA_FLAGS;

> + s->offset = 0;

Hmmm... Move this line into calculate_sizes()?