aboutsummaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
Diffstat (limited to 'mm')
-rw-r--r--mm/slab.c21
1 files changed, 2 insertions, 19 deletions
diff --git a/mm/slab.c b/mm/slab.c
index 24235506b2a0..f477acfb732f 100644
--- a/mm/slab.c
+++ b/mm/slab.c
@@ -2119,23 +2119,6 @@ static void check_spinlock_acquired_node(struct kmem_cache *cachep, int node)
2119#define check_spinlock_acquired_node(x, y) do { } while(0) 2119#define check_spinlock_acquired_node(x, y) do { } while(0)
2120#endif 2120#endif
2121 2121
2122/*
2123 * Waits for all CPUs to execute func().
2124 */
2125static void smp_call_function_all_cpus(void (*func)(void *arg), void *arg)
2126{
2127 check_irq_on();
2128 preempt_disable();
2129 local_irq_disable();
2130 func(arg);
2131 local_irq_enable();
2132
2133 if (smp_call_function(func, arg, 1, 1))
2134 BUG();
2135
2136 preempt_enable();
2137}
2138
2139static void drain_array_locked(struct kmem_cache *cachep, 2122static void drain_array_locked(struct kmem_cache *cachep,
2140 struct array_cache *ac, int force, int node); 2123 struct array_cache *ac, int force, int node);
2141 2124
@@ -2158,7 +2141,7 @@ static void drain_cpu_caches(struct kmem_cache *cachep)
2158 struct kmem_list3 *l3; 2141 struct kmem_list3 *l3;
2159 int node; 2142 int node;
2160 2143
2161 smp_call_function_all_cpus(do_drain, cachep); 2144 on_each_cpu(do_drain, cachep, 1, 1);
2162 check_irq_on(); 2145 check_irq_on();
2163 for_each_online_node(node) { 2146 for_each_online_node(node) {
2164 l3 = cachep->nodelists[node]; 2147 l3 = cachep->nodelists[node];
@@ -3449,7 +3432,7 @@ static int do_tune_cpucache(struct kmem_cache *cachep, int limit,
3449 } 3432 }
3450 new.cachep = cachep; 3433 new.cachep = cachep;
3451 3434
3452 smp_call_function_all_cpus(do_ccupdate_local, (void *)&new); 3435 on_each_cpu(do_ccupdate_local, (void *)&new, 1, 1);
3453 3436
3454 check_irq_on(); 3437 check_irq_on();
3455 cachep->batchcount = batchcount; 3438 cachep->batchcount = batchcount;