Re: [PATCH] micro optimization of cache_estimate in slab.c

From: Pekka Enberg
Date: Sun Dec 18 2005 - 12:26:41 EST


Hi Steven,

On 12/18/05, Steven Rostedt <rostedt@xxxxxxxxxxx> wrote:
> + do {
> + x = 1;
> + while ((x+i)*size + ALIGN(base+(x+i)*extra, align) <= wastage)
> + x <<= 1;
> + i += (x >> 1);
> + } while (x > 1);

The above is pretty hard to read. Perhaps we could give x and i better
names? Also, couldn't we move left part of the expression into a
separate static inline function for readability?

Pekka
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/