On Thu, Jan 20, 2011 at 02:11:59AM +0000, YAMAMOTO Takashi wrote: > hi, > > > Benefits I've thought about: > > - The kmem pools use pool_caches therefor scalability will be much > > better as the old malloc has a single lock for all access, the pools > > have one each with a per cpu cache layer. > > - The old malloc only returns oversized allocations back to the kmem > > layer but nothing that is in it's bucket, pools can be drained... > > - Removing one redundant interface in the kernel-api (in the long > > term, when dropping the malloc wrapper) > > thanks for working on this. > while i'm all for removing malloc(9), i tend to think it should be done > by changing the users to use either kmem_alloc or pool_cache, instead of > making kmem_alloc interrupt-safe. i don't think there's much demand for > interrupt-safe variable-sized memory allocations.
Agreed. Variable-sized allocations from interrupt context are indicative of a design flaw. Either the processing should happen at another level, or allocations should be from a pool (whether that is pool_cache or some private mechanism).
