Re: slab fragmentation ?
From: Manfred Spraul <hidden>
Date: 2004-10-05 18:49:17
Badari Pulavarty wrote:
quoted
The fix would be simple: kmem_cache_alloc_node must walk through the list of partial slabs and check if it finds a slab from the correct node. If it does, then just use that slab instead of allocating a new one. And statistics must be added to kmem_cache_alloc_node - I forgot that when I wrote the function.I will add more debug to find out if this is happening or not. What stats you want me to update in kmem_cache_alloc_node() ?
I would just add a printk to confirm our suspicion.
"kmem_cache_alloc_node called" + dump_stack(). I always use that
approach, thus I forgot to add proper statistics.
For the final fix:
Add a field to struct kmem_cache_s. Something like "unsigned long
alloc_node" or so. Add a STATS_INC_ALLOC_NODE macro and use it. Export
the field value in the globalstat block (see s_show() near the end of
slab.c) and increase the version number to 2.1 (in s_start()).
--
Manfred
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"aart@kvack.org"> aart@kvack.org </a>