History

smp: Remove allocation mask from on_each_cpu_cond.*()

The allocation mask is no longer used by on_each_cpu_cond() and on_each_cpu_cond_mask() and can be removed.

Sebastian Andrzej Siewior committed 6 years ago

Commit cb923151 parent 67719ef6 files · +11 −20Browse files

Unified · Split

6 files
  1. arch/x86/mm/tlb.c +1 −1
  2. fs/buffer.c +1 −1
  3. include/linux/smp.h +2 −3
  4. kernel/smp.c +3 −10
  5. kernel/up.c +3 −4
  6. mm/slub.c +1 −1
arch/x86/mm/tlb.c+1−1
@@ -708,7 +708,7 @@ void native_flush_tlb_others(const struct cpumask *cpumask, · 707 unmodified lines
708708 (void *)info, 1);
709709 else
710710 on_each_cpu_cond_mask(tlb_is_not_lazy, flush_tlb_func_remote,
711− (void *)info, 1, GFP_ATOMIC, cpumask);
711+ (void *)info, 1, cpumask);
712712 }
713713
714714 /*
fs/buffer.c+1−1
@@ -1433,7 +1433,7 @@ static bool has_bh_in_lru(int cpu, void *dummy) · 1432 unmodified lines
14331433
14341434 void invalidate_bh_lrus(void)
14351435 {
1436− on_each_cpu_cond(has_bh_in_lru, invalidate_bh_lru, NULL, 1, GFP_KERNEL);
1436+ on_each_cpu_cond(has_bh_in_lru, invalidate_bh_lru, NULL, 1);
14371437 }
14381438 EXPORT_SYMBOL_GPL(invalidate_bh_lrus);
14391439
include/linux/smp.h+2−3
@@ -51,11 +51,10 @@ void on_each_cpu_mask(const struct cpumask *mask, smp_call_func_t func, · 50 unmodified lines
5151 * processor.
5252 */
5353 void on_each_cpu_cond(smp_cond_func_t cond_func, smp_call_func_t func,
54− void *info, bool wait, gfp_t gfp_flags);
54+ void *info, bool wait);
5555
5656 void on_each_cpu_cond_mask(smp_cond_func_t cond_func, smp_call_func_t func,
57− void *info, bool wait, gfp_t gfp_flags,
58− const struct cpumask *mask);
57+ void *info, bool wait, const struct cpumask *mask);
5958
6059 int smp_call_function_single_async(int cpu, call_single_data_t *csd);
6160
kernel/smp.c+3−10
@@ -679,11 +679,6 @@ EXPORT_SYMBOL(on_each_cpu_mask); · 678 unmodified lines
679679 * @info: An arbitrary pointer to pass to both functions.
680680 * @wait: If true, wait (atomically) until function has
681681 * completed on other CPUs.
682− * @gfp_flags: GFP flags to use when allocating the cpumask
683− * used internally by the function.
684− *
685− * The function might sleep if the GFP flags indicates a non
686− * atomic allocation is allowed.
687682 *
688683 * Preemption is disabled to protect against CPUs going offline but not online.
689684 * CPUs going online during the call will not be seen or sent an IPI.
@@ -692,8 +687,7 @@ EXPORT_SYMBOL(on_each_cpu_mask); · 2 unmodified lines
692687 * from a hardware interrupt handler or from a bottom half handler.
693688 */
694689 void on_each_cpu_cond_mask(smp_cond_func_t cond_func, smp_call_func_t func,
695− void *info, bool wait, gfp_t gfp_flags,
696− const struct cpumask *mask)
690+ void *info, bool wait, const struct cpumask *mask)
697691 {
698692 int cpu = get_cpu();
699693
@@ -710,10 +704,9 @@ void on_each_cpu_cond_mask(smp_cond_func_t cond_func, smp_call_func_t func, · 10 unmodified lines
710704 EXPORT_SYMBOL(on_each_cpu_cond_mask);
711705
712706 void on_each_cpu_cond(smp_cond_func_t cond_func, smp_call_func_t func,
713− void *info, bool wait, gfp_t gfp_flags)
707+ void *info, bool wait)
714708 {
715− on_each_cpu_cond_mask(cond_func, func, info, wait, gfp_flags,
716− cpu_online_mask);
709+ on_each_cpu_cond_mask(cond_func, func, info, wait, cpu_online_mask);
717710 }
718711 EXPORT_SYMBOL(on_each_cpu_cond);
719712
kernel/up.c+3−4
@@ -69,8 +69,7 @@ EXPORT_SYMBOL(on_each_cpu_mask); · 68 unmodified lines
6969 * same condtions in UP and SMP.
7070 */
7171 void on_each_cpu_cond_mask(smp_cond_func_t cond_func, smp_call_func_t func,
72− void *info, bool wait, gfp_t gfp_flags,
73− const struct cpumask *mask)
72+ void *info, bool wait, const struct cpumask *mask)
7473 {
7574 unsigned long flags;
7675
@@ -85,9 +84,9 @@ void on_each_cpu_cond_mask(smp_cond_func_t cond_func, smp_call_func_t func, · 8 unmodified lines
8584 EXPORT_SYMBOL(on_each_cpu_cond_mask);
8685
8786 void on_each_cpu_cond(smp_cond_func_t cond_func, smp_call_func_t func,
88− void *info, bool wait, gfp_t gfp_flags)
87+ void *info, bool wait)
8988 {
90− on_each_cpu_cond_mask(cond_func, func, info, wait, gfp_flags, NULL);
89+ on_each_cpu_cond_mask(cond_func, func, info, wait, NULL);
9190 }
9291 EXPORT_SYMBOL(on_each_cpu_cond);
9392
mm/slub.c+1−1
@@ -2341,7 +2341,7 @@ static bool has_cpu_slab(int cpu, void *info) · 2340 unmodified lines
23412341
23422342 static void flush_all(struct kmem_cache *s)
23432343 {
2344− on_each_cpu_cond(has_cpu_slab, flush_cpu_slab, s, 1, GFP_ATOMIC);
2344+ on_each_cpu_cond(has_cpu_slab, flush_cpu_slab, s, 1);
23452345 }
23462346
23472347 /*