Re: [PATCH] - Allocate larger cache_cache if order 0 fails

From: Jack Steiner
Date: Tue Mar 07 2006 - 15:55:45 EST


On Tue, Mar 07, 2006 at 09:36:04PM +0200, Pekka Enberg wrote:
> Hi Jack,
>
> On 3/7/06, Jack Steiner <steiner@xxxxxxx> wrote:
> > - cache_estimate(0, cache_cache.buffer_size, cache_line_size(), 0,
> > - &left_over, &cache_cache.num);
> > + for (order = 0; order < MAX_ORDER; order++) {
> > + cache_estimate(order, cache_cache.buffer_size, cache_line_size(), 0,
> > + &left_over, &cache_cache.num);
> > + if (cache_cache.num)
> > + break;
> > + }
>
> Any reason why you can't use calculate_slab_order() here?
>
> Pekka

I think either will work & the amount of code is about the same.

I chose the above because it was easier to see that change had no effect
on existing platforms.

Does anyone see a compelling reason for a different but equivalent implementation??

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