diff --git a/mm/slab.c b/mm/slab.c index 21b2aef25254c191916e900b0913d03fa795b8bf..ae440b5ba60e4e6668197521b13266ca9b3099e0 100644 --- a/mm/slab.c +++ b/mm/slab.c @@ -4033,10 +4033,8 @@ static int enable_cpucache(struct kmem_cache *cachep) * to a larger limit. Thus disabled by default. */ shared = 0; -#ifdef CONFIG_SMP - if (cachep->buffer_size <= PAGE_SIZE) + if (cachep->buffer_size <= PAGE_SIZE && num_possible_cpus() > 1) shared = 8; -#endif #if DEBUG /*