Subject: Re: Pool changes
To: None <ad@netbsd.org>
From: YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp>
List: tech-kern
Date: 10/16/2007 07:09:47
> Hi,
> 
> While adding CPU level caches to pool_cache on the vmlocking branch, I also
> changed the interface to be more LKM friendly. I need to give invalidation
> the ability to drain caches on remote CPUs, but once that is done I'd like
> to merge these changes into -current (but with the MP locking stubbed out
> for now, some users of the interface will trigger lock assertions).
> 
> The changes are:
> 
> 1. Caches are dynamically allocated so that users don't need to worry about
>    internal changes. The idea is that pool_cache should become the public
>    slab/object allocator that device drivers / LKMs use, and the pool
>    allocator should be for "kernel internal" use.
> 
>    pool_cache_t
>    pool_cache_init(size_t size, u_int align, u_int align_offset,
>       u_int flags, const char *wchan, struct pool_allocator *palloc,
>       int ipl, int (*ctor)(void *, void *, int),
>       void (*dtor)(void *, void *), void *arg)

if you care about LKM friendliness, isn't it better to hide pool_allocator?

YAMAMOTO Takashi