]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blobdiff - mm/slab.c
Merge tag 'for-linus-4.12b-rc0c-tag' of git://git.kernel.org/pub/scm/linux/kernel...
[mirror_ubuntu-artful-kernel.git] / mm / slab.c
index 807d86c769088681b47f41c0cc0a721307bd16c1..2a31ee3c5814f192234385303a0d86cc77790580 100644 (file)
--- a/mm/slab.c
+++ b/mm/slab.c
@@ -1728,7 +1728,7 @@ static void slab_destroy(struct kmem_cache *cachep, struct page *page)
 
        freelist = page->freelist;
        slab_destroy_debugcheck(cachep, page);
-       if (unlikely(cachep->flags & SLAB_DESTROY_BY_RCU))
+       if (unlikely(cachep->flags & SLAB_TYPESAFE_BY_RCU))
                call_rcu(&page->rcu_head, kmem_rcu_free);
        else
                kmem_freepages(cachep, page);
@@ -1924,7 +1924,7 @@ static bool set_objfreelist_slab_cache(struct kmem_cache *cachep,
 
        cachep->num = 0;
 
-       if (cachep->ctor || flags & SLAB_DESTROY_BY_RCU)
+       if (cachep->ctor || flags & SLAB_TYPESAFE_BY_RCU)
                return false;
 
        left = calculate_slab_order(cachep, size,
@@ -2030,7 +2030,7 @@ __kmem_cache_create (struct kmem_cache *cachep, unsigned long flags)
        if (size < 4096 || fls(size - 1) == fls(size-1 + REDZONE_ALIGN +
                                                2 * sizeof(unsigned long long)))
                flags |= SLAB_RED_ZONE | SLAB_STORE_USER;
-       if (!(flags & SLAB_DESTROY_BY_RCU))
+       if (!(flags & SLAB_TYPESAFE_BY_RCU))
                flags |= SLAB_POISON;
 #endif
 #endif
@@ -3879,7 +3879,12 @@ static int __do_tune_cpucache(struct kmem_cache *cachep, int limit,
 
        prev = cachep->cpu_cache;
        cachep->cpu_cache = cpu_cache;
-       kick_all_cpus_sync();
+       /*
+        * Without a previous cpu_cache there's no need to synchronize remote
+        * cpus, so skip the IPIs.
+        */
+       if (prev)
+               kick_all_cpus_sync();
 
        check_irq_on();
        cachep->batchcount = batchcount;