[dm-devel] [PATCH] dm.c : Per-device caches

Joe Thornber joe at fib011235813.fsnet.co.uk
Mon Jan 13 12:22:01 UTC 2003


On Mon, Jan 13, 2003 at 11:20:22AM -0600, Kevin Corry wrote:
> On Monday 13 January 2003 11:50, Joe Thornber wrote:
> > On Mon, Jan 13, 2003 at 10:04:15AM -0600, Kevin Corry wrote:
> > > A change a few weeks ago introduced per-device mempools for dm_io
> > > structures, but still used a global cache. This patch introduces
> > > per-devices caches.
> >
> > This is pointless, or am I missing something ?
> 
> Like I said, I'm not entirely sure. This is the way we did mempools in EVMS, 
> and there seem to be a couple other places that do this. But, there really 
> aren't too many mempool users in the kernel, so it's hard to find examples of 
> the best way to use them.

The _io_cache is just an allocator, we're not using it as a cache at
all (kmem_cache_t is a bad name IMO).  When we create the mempool
the mempool pre-allocates a set of the io object from the allocator.
There is no reason why different slab allocators need to be used,
unless you are allocating object of differing sizes.

- Joe




More information about the dm-devel mailing list