On Wed, 20 Feb 2008 15:46:14 +0100 Peter Zijlstra <[EMAIL PROTECTED]> wrote:
> Provide a method to get the upper bound on the pages needed to allocate > a given number of objects from a given kmem_cache. > > This lays the foundation for a generic reserve framework as presented in > a later patch in this series. This framework needs to convert object demand > (kmalloc() bytes, kmem_cache_alloc() objects) to pages. > > ... > > /* > + * return the max number of pages required to allocated count > + * objects from the given cache > + */ > +unsigned kmem_estimate_pages(struct kmem_cache *s, gfp_t flags, int objects) You might want to have another go at that comment. > +/* > + * return the max number of pages required to allocate @bytes from kmalloc > + * in an unspecified number of allocation of heterogeneous size. > + */ > +unsigned kestimate(gfp_t flags, size_t bytes) And its pal. -- 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