[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Pine.LNX.4.64.0706081527160.3966@schroedinger.engr.sgi.com>
Date: Fri, 8 Jun 2007 15:30:09 -0700 (PDT)
From: Christoph Lameter <clameter@....com>
To: Andrew Morton <akpm@...ux-foundation.org>
cc: anil.s.keshavamurthy@...el.com, linux-kernel@...r.kernel.org,
ak@...e.de, gregkh@...e.de, muli@...ibm.com,
asit.k.mallick@...el.com, suresh.b.siddha@...el.com,
arjan@...ux.intel.com, ashok.raj@...el.com, shaohua.li@...el.com,
davem@...emloft.net
Subject: Re: [Intel-IOMMU 06/10] Intel IOMMU driver
On Thu, 7 Jun 2007, Andrew Morton wrote:
> > +void *iommu_rpool_alloc(unsigned int size, gfp_t flag)
> > +{
> > + if (size == PAGE_SIZE_4K)
> > + return(void *)get_zeroed_page(flag);
> > + else
> > + return kzalloc(size, flag);
> > +}
>
> kmalloc(4k) is pretty efficient and (I think) is guaranteed to return a
> page-aligned address.
Page allocations should be done through the page allocator. 4k
allocations benefit from the per cpu caches of the page allocator which
makes the use of the page allocator fastest and best for 4k allocs.
kmalloc allocations are not guaranteed to be aligned to 4k boundaries.
They usually are but ...
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists