summaryrefslogtreecommitdiffstats
path: root/mm/slub.c
diff options
context:
space:
mode:
authorPekka Enberg2012-01-11 20:11:29 +0100
committerPekka Enberg2012-01-11 20:11:29 +0100
commit5878cf431ca7233a56819ca6970153ac0b129599 (patch)
treee5d21d04a0b468d2dabbe3a3824f23b5537fc6a7 /mm/slub.c
parentslub: disallow changing cpu_partial from userspace for debug caches (diff)
parentslub: add missed accounting (diff)
downloadkernel-qcow2-linux-5878cf431ca7233a56819ca6970153ac0b129599.tar.gz
kernel-qcow2-linux-5878cf431ca7233a56819ca6970153ac0b129599.tar.xz
kernel-qcow2-linux-5878cf431ca7233a56819ca6970153ac0b129599.zip
Merge branch 'slab/urgent' into slab/for-linus
Diffstat (limited to 'mm/slub.c')
-rw-r--r--mm/slub.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/mm/slub.c b/mm/slub.c
index a47df0aa5d36..19436f538760 100644
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -3043,7 +3043,9 @@ static int kmem_cache_open(struct kmem_cache *s,
* per node list when we run out of per cpu objects. We only fetch 50%
* to keep some capacity around for frees.
*/
- if (s->size >= PAGE_SIZE)
+ if (kmem_cache_debug(s))
+ s->cpu_partial = 0;
+ else if (s->size >= PAGE_SIZE)
s->cpu_partial = 2;
else if (s->size >= 1024)
s->cpu_partial = 6;