Re: [RFC/PATCH 2/2] slub: Don't share struct kmem_cache for shared caches
From: Pekka Enberg
Date: Mon Apr 25 2011 - 15:25:58 EST
On Mon, 25 Apr 2011, Pekka Enberg wrote:
>> This patch changes the slab cache sharing in SLUB to only share 'struct
>> kmem_cpu_cache' which contains the actual list of slabs and object freelists.
>> We no longer share 'struct kmem_cache' between merged caches so /proc/slabinfo
>> statistics work as expected:
On Mon, Apr 25, 2011 at 10:09 PM, Christoph Lameter <cl@xxxxxxxxx> wrote:
> I am a bit confused. Struct kmem_cache contains per slab
> allocation information and all pages have pointers to struct kmem_cache.
>
> So we have pages now on the kmem_cache_cpu list with varying kmem_cache
> pointers? How do we figure out which cache a page belongs to? It seems
> that a page from one cache can be freed to the freelists of another.
We share the freelist so it goes to the same freelist. However, I
completely forgot about page to struct kmem_cache mapping so stats
won't work properly.
On Mon, Apr 25, 2011 at 10:09 PM, Christoph Lameter <cl@xxxxxxxxx> wrote:
> Does this even run right with the debugging enabled?
It boots OK to minimal userspace under KVM with slub_debug. But no, I
didn't test it properly yet.
Pekka
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/