kernel_samsung_a53x/kernel/trace
Clément Léger bb1a49e5e1 tracing: relax trace_event_eval_update() execution with cond_resched()
[ Upstream commit 23cce5f25491968b23fb9c399bbfb25f13870cd9 ]

When kernel is compiled without preemption, the eval_map_work_func()
(which calls trace_event_eval_update()) will not be preempted up to its
complete execution. This can actually cause a problem since if another
CPU call stop_machine(), the call will have to wait for the
eval_map_work_func() function to finish executing in the workqueue
before being able to be scheduled. This problem was observe on a SMP
system at boot time, when the CPU calling the initcalls executed
clocksource_done_booting() which in the end calls stop_machine(). We
observed a 1 second delay because one CPU was executing
eval_map_work_func() and was not preempted by the stop_machine() task.

Adding a call to cond_resched() in trace_event_eval_update() allows
other tasks to be executed and thus continue working asynchronously
like before without blocking any pending task at boot time.

Link: https://lore.kernel.org/linux-trace-kernel/20230929191637.416931-1-cleger@rivosinc.com

Cc: Masami Hiramatsu <mhiramat@kernel.org>
Signed-off-by: Clément Léger <cleger@rivosinc.com>
Tested-by: Atish Patra <atishp@rivosinc.com>
Reviewed-by: Atish Patra <atishp@rivosinc.com>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-08 11:26:16 +01:00
..
blktrace.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
bpf_trace.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
bpf_trace.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
error_report-traces.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
fgraph.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ftrace.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ftrace_internal.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ipc_logging.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ipc_logging_debug.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ipc_logging_private.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Kconfig Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
kprobe_event_gen_test.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Makefile Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
power-traces.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
preemptirq_delay_test.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ring_buffer.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ring_buffer_benchmark.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
rpm-traces.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
synth_event_gen_test.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
trace.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
trace.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
trace_benchmark.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
trace_benchmark.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
trace_boot.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
trace_branch.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
trace_clock.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
trace_dynevent.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
trace_dynevent.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
trace_entries.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
trace_event_perf.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
trace_events.c tracing: relax trace_event_eval_update() execution with cond_resched() 2024-11-08 11:26:16 +01:00
trace_events_filter.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
trace_events_filter_test.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
trace_events_hist.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
trace_events_inject.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
trace_events_synth.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
trace_events_trigger.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
trace_export.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
trace_functions.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
trace_functions_graph.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
trace_hwlat.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
trace_irqsoff.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
trace_kdb.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
trace_kprobe.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
trace_kprobe_selftest.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
trace_kprobe_selftest.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
trace_mmiotrace.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
trace_nop.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
trace_output.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
trace_output.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
trace_preemptirq.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
trace_printk.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
trace_probe.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
trace_probe.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
trace_probe_tmpl.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
trace_readwrite.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
trace_sched_switch.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
trace_sched_wakeup.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
trace_selftest.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
trace_selftest_dynamic.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
trace_seq.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
trace_stack.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
trace_stat.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
trace_stat.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
trace_synth.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
trace_syscalls.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
trace_uprobe.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
tracing_map.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
tracing_map.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00