Will smp_call_function_single(cpu, ...) broadcast IPI to all other cpus?
richard clark
richard.xnu.clark at gmail.com
Thu Jun 27 18:57:04 PDT 2024
Hi M. & Steve:
On Thu, Jun 27, 2024 at 10:12 PM Steven Rostedt <rostedt at goodmis.org> wrote:
>
> On Thu, 27 Jun 2024 11:38:58 +0100
> Marc Zyngier <maz at kernel.org> wrote:
>
> > You may want to enable stack trace recording and find out for yourself
> > where these ipi_raise() calls are coming from.
>
> Try trace-cmd:
>
> # trace-cmd start -e ipi_raise -R 'stacktrace if reason=="Function call interrupts"'
> # taskset -c 0 insmod /kmods/ipi_test.ko
> # trace-cmd stop
> # trace-cmd show
>
insmod-3169 [000] ....1.. 51869.953886: ipi_raise:
target_mask=00000000,00000ffe (Function call interrupts)
insmod-3169 [000] ....2.. 51869.953887: <stack trace>
=> trace_event_raw_event_ipi_raise
=> smp_cross_call
=> arch_send_call_function_ipi_mask
=> smp_call_function_many_cond
=> kick_all_cpus_sync
=> load_module
=> __do_sys_finit_module
=> __arm64_sys_finit_module
=> invoke_syscall
=> el0_svc_common.constprop.0
=> do_el0_svc
=> el0_svc
=> el0t_64_sync_handler
=> el0t_64_sync
insmod-3169 [000] ....1.. 51869.953897: ipi_raise:
target_mask=00000000,00000ffe (Function call interrupts)
insmod-3169 [000] ....2.. 51869.953898: <stack trace>
=> trace_event_raw_event_ipi_raise
=> smp_cross_call
=> arch_send_call_function_ipi_mask
=> smp_call_function_many_cond
=> kick_all_cpus_sync
=> load_module
=> __do_sys_finit_module
=> __arm64_sys_finit_module
=> invoke_syscall
=> el0_svc_common.constprop.0
=> do_el0_svc
=> el0_svc
=> el0t_64_sync_handler
=> el0t_64_sync
insmod-3169 [000] ....1.. 51869.954145: ipi_raise:
target_mask=00000000,00000080 (Function call interrupts)
insmod-3169 [000] ....2.. 51869.954146: <stack trace>
=> trace_event_raw_event_ipi_raise
=> smp_cross_call
=> arch_send_call_function_single_ipi
=> send_call_function_single_ipi
=> generic_exec_single
=> smp_call_function_single
=> run_smp_call_function_test
=> ipi_lat_init
=> do_one_initcall
=> do_init_module
=> load_module
Ah, the first two IPIs raised from the load_module() ->
flush_module_icache() -> flush_icache_range() -> kick_all_cpus_sync()
-> smp_call_function(do_nothing, NULL, 1) chain.
Very powerful and great tool :) Thanks guys!
> -- Steve
More information about the linux-arm-kernel
mailing list