On Thu, 30 Nov 2006, Peter Zijlstra wrote:
> +unsigned int kmem_cache_objs_to_pages(struct kmem_cache *cachep, int nr)
> +{
> + return ((nr + cachep->num - 1) / cachep->num) << cachep->gfporder;
cachep->num refers to the number of objects in a slab of gfporder.
thus
return (nr + cachep->num - 1) / cachep->num;
But then this is very optimistic estimate that assumes a single node and
no free objects in between.
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html