summaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
Diffstat (limited to 'mm')
-rw-r--r--mm/slab.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/mm/slab.c b/mm/slab.c
index 21b2aef25254..ae440b5ba60e 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
/*
OpenPOWER on IntegriCloud