mirror of
https://github.com/lkl/linux.git
synced 2025-12-19 16:13:19 +09:00
mm, slub: don't create kmalloc-rcl caches with CONFIG_SLUB_TINY
Distinguishing kmalloc(__GFP_RECLAIMABLE) can help against fragmentation by grouping pages by mobility, but on tiny systems the extra memory overhead of separate set of kmalloc-rcl caches will probably be worse, and mobility grouping likely disabled anyway. Thus with CONFIG_SLUB_TINY, don't create kmalloc-rcl caches and use the regular ones. Signed-off-by: Vlastimil Babka <vbabka@suse.cz> Acked-by: Mike Rapoport <rppt@linux.ibm.com> Reviewed-by: Christoph Lameter <cl@linux.com>
This commit is contained in:
@@ -336,12 +336,17 @@ enum kmalloc_cache_type {
|
||||
#endif
|
||||
#ifndef CONFIG_MEMCG_KMEM
|
||||
KMALLOC_CGROUP = KMALLOC_NORMAL,
|
||||
#else
|
||||
KMALLOC_CGROUP,
|
||||
#endif
|
||||
#ifdef CONFIG_SLUB_TINY
|
||||
KMALLOC_RECLAIM = KMALLOC_NORMAL,
|
||||
#else
|
||||
KMALLOC_RECLAIM,
|
||||
#endif
|
||||
#ifdef CONFIG_ZONE_DMA
|
||||
KMALLOC_DMA,
|
||||
#endif
|
||||
#ifdef CONFIG_MEMCG_KMEM
|
||||
KMALLOC_CGROUP,
|
||||
#endif
|
||||
NR_KMALLOC_TYPES
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user