Re: [PATCH] IPoIB queue size tune patch

From: Roland Dreier
Date: Fri Mar 31 2006 - 18:09:25 EST


> +static int expsize(int size)
> +{
> + int expsize_t = 1;
> + int j = 1;
> + while (size / 2 >= expsize_t) {
> + expsize_t = 1 << ++j;
> + }
> + return expsize_t;
> +}

Yikes... is this just a very hard-to-understand version of roundup_pow_of_two()?

Hmm, no, it's rounding down I guess. But is there any reason not to
use roundup_pow_of_two() instead?

- R.
-
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/