Re: [patch 3/9] mempool - Make mempools NUMA aware

Matthew Dobson
2006-01-28T01:08:55Z

Benjamin LaHaise wrote:
> On Thu, Jan 26, 2006 at 04:35:56PM -0800, Matthew Dobson wrote:
>
>>Ummm... ok? But with only a simple flag, how do you know *which* mempool
>>you're trying to use? What if you want to use a mempool for a non-slab
>>allocation?
>
>
> Are there any? A quick poke around has only found a couple of places
> that use kzalloc(), which is still quite effectively a slab allocation.
> There seems to be just one page user, the dm-crypt driver, which could
> be served by a reservation scheme.

A couple. If Andrew is willing to pick up the mempool patches I posted an
hour or so ago, there will be only 4 mempool users that aren't using a
common mempool allocator. Regardless of whether that happens, there are
only a few users that aren't slab based:
1) mm/highmem.c - page based allocator
2) drivers/scsi/scsi_transport_iscsi.c - calls alloc_skb(), which does
eventually end up making a slab allocation
3) drivers/md/raid1.c & raid10.c - easily the biggest mempool_alloc
functions in the kernel. Non-trivial.
4) drivers/md/dm-crypt.c - the driver you mentioned, also using a page
allocator

So we could possibly get away with a reservation scheme, but a couple users
would be non-trivial to fixup.

-Matt