[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <1164975280.6588.188.camel@twins>
Date: Fri, 01 Dec 2006 13:14:40 +0100
From: Peter Zijlstra <a.p.zijlstra@...llo.nl>
To: Christoph Lameter <clameter@....com>
Cc: netdev@...r.kernel.org, linux-mm@...ck.org,
David Miller <davem@...emloft.net>
Subject: Re: [RFC][PATCH 5/6] slab: kmem_cache_objs_to_pages()
On Thu, 2006-11-30 at 10:55 -0800, Christoph Lameter wrote:
> 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;
No, that would give the number of slabs needed, I want pages.
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists