[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20070608204033.GS17143@linux-os.sc.intel.com>
Date: Fri, 8 Jun 2007 13:40:33 -0700
From: "Siddha, Suresh B" <suresh.b.siddha@...el.com>
To: "Keshavamurthy, Anil S" <anil.s.keshavamurthy@...el.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
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 02/10] Library routine for pre-allocat pool handling
On Fri, Jun 08, 2007 at 01:12:00PM -0700, Keshavamurthy, Anil S wrote:
> The resource pool indeed provide extra robustness, the initial pool size will
> be equal to min_count + grow_count. If the pool object count goes below
> min_count, then pool grows in the background while serving as emergency
> pool with min_count of objects in it. If we run out of emergency pool objects
> before the pool grow in the background, then we go to OS for allocation.
>
> Similary, if the pool objects grows above the max threshold,
> the objects are freed to OS in the background thread maintaining
> the pool objects close to min_count + grow_count size.
slab already has this and it has additional functionalities like reaping
over time, when there is no activity...
> We need several objects of size say( 4 * sizeof(u64)) and reuse
> them in dma map/unmap api calls for managing io virtual allocation address that
> this driver has dished out. Hence having pool of objects where we put
> the element in the linked list and and get it from the linked list is pretty
> fast compared to slab.
Not sure how is this fast compared to slab. Atleast slab is lockless in the
fast case..
> We had this kmem_cache_alloc() with mempool concept earlier and Andi suggest to
> come up with something pre-allocated pool.
> Andi, Can you chime in please.
In the initial patches, only for iova we were using slabs + mempool. But
for others like pgtable_mempool, we were using simple mempools.
Even slabs + mempool is not same as just usng slab.. slab is lockless
for the fast case.
thanks,
suresh
-
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