smp: Trace IPIs sent via arch_send_call_function_ipi_mask()
authorValentin Schneider <vschneid@redhat.com>
Tue, 7 Mar 2023 14:35:54 +0000 (14:35 +0000)
committerPeter Zijlstra <peterz@infradead.org>
Fri, 24 Mar 2023 10:01:27 +0000 (11:01 +0100)
This simply wraps around the arch function and prepends it with a
tracepoint, similar to send_call_function_single_ipi().

Signed-off-by: Valentin Schneider <vschneid@redhat.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Steven Rostedt (Google) <rostedt@goodmis.org>
Link: https://lore.kernel.org/r/20230307143558.294354-4-vschneid@redhat.com
kernel/smp.c

index 770e879a727481f639a804ef1ca67510bf3e3583..03e6d576295de5d9299e5e0212ff0a72b68934d6 100644 (file)
@@ -103,6 +103,13 @@ void __init call_function_init(void)
        smpcfd_prepare_cpu(smp_processor_id());
 }
 
+static __always_inline void
+send_call_function_ipi_mask(struct cpumask *mask)
+{
+       trace_ipi_send_cpumask(mask, _RET_IP_, NULL);
+       arch_send_call_function_ipi_mask(mask);
+}
+
 #ifdef CONFIG_CSD_LOCK_WAIT_DEBUG
 
 static DEFINE_STATIC_KEY_MAYBE(CONFIG_CSD_LOCK_WAIT_DEBUG_DEFAULT, csdlock_debug_enabled);
@@ -762,7 +769,7 @@ static void smp_call_function_many_cond(const struct cpumask *mask,
                if (nr_cpus == 1)
                        send_call_function_single_ipi(last_cpu);
                else if (likely(nr_cpus > 1))
-                       arch_send_call_function_ipi_mask(cfd->cpumask_ipi);
+                       send_call_function_ipi_mask(cfd->cpumask_ipi);
        }
 
        if (run_local && (!cond_func || cond_func(this_cpu, info))) {