Re: [PATCH] mm, slab: Drop unnecessary slabp->inuse < cachep->numtest

From: Christoph Lameter
Date: Mon Jul 01 2013 - 14:19:49 EST


On Tue, 2 Jul 2013, Zhang Yanfei wrote:

> From: Zhang Yanfei <zhangyanfei@xxxxxxxxxxxxxx>
>
> In function cache_alloc_refill, we have used BUG_ON to ensure
> that slabp->inuse is less than cachep->num before the while
> test. And in the while body, we do not change the value of
> slabp->inuse and cachep->num, so it is not necessary to test
> if slabp->inuse < cachep->num test for every loop.

The body calls slab_get_obj which changes slabp->inuse!
--
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/