diff --git a/mm/slab.c b/mm/slab.c index 57f7aa4..a69d0a5 100644 --- a/mm/slab.c +++ b/mm/slab.c @@ -3975,10 +3975,8 @@ static int enable_cpucache(struct kmem_c * 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 /*