* [PATCH] tracing: sched: Hide numa balancing trace events
@ 2025-07-22 14:48 Steven Rostedt
2025-07-22 23:00 ` Steven Rostedt
0 siblings, 1 reply; 2+ messages in thread
From: Steven Rostedt @ 2025-07-22 14:48 UTC (permalink / raw)
To: LKML, Linux trace kernel
Cc: Masami Hiramatsu, Mathieu Desnoyers, Ingo Molnar, Peter Zijlstra,
Vincent Guittot, Dietmar Eggemann, Mel Gorman, Valentin Schneider
From: Steven Rostedt <rostedt@goodmis.org>
The trace events sched_move_numa, sched_swap_numa and sched_stick_numa are
only used when CONFIG_NUMA_BALANCING is enabled. Put an #ifdef guard
around the definitions of these trace events so they are not defined when
numa balancing is not enabled, otherwise they waste a bit of memory being
unused.
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
---
include/trace/events/sched.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/include/trace/events/sched.h b/include/trace/events/sched.h
index 4e6b2910cec3..51776b45549a 100644
--- a/include/trace/events/sched.h
+++ b/include/trace/events/sched.h
@@ -628,6 +628,7 @@ TRACE_EVENT(sched_process_hang,
);
#endif /* CONFIG_DETECT_HUNG_TASK */
+#ifdef CONFIG_NUMA_BALANCING
/*
* Tracks migration of tasks from one runqueue to another. Can be used to
* detect if automatic NUMA balancing is bouncing between nodes.
@@ -719,6 +720,7 @@ DEFINE_EVENT(sched_numa_pair_template, sched_swap_numa,
TP_ARGS(src_tsk, src_cpu, dst_tsk, dst_cpu)
);
+#endif /* CONFIG_NUMA_BALANCING */
#ifdef CONFIG_NUMA_BALANCING
#define NUMAB_SKIP_REASON \
--
2.47.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] tracing: sched: Hide numa balancing trace events
2025-07-22 14:48 [PATCH] tracing: sched: Hide numa balancing trace events Steven Rostedt
@ 2025-07-22 23:00 ` Steven Rostedt
0 siblings, 0 replies; 2+ messages in thread
From: Steven Rostedt @ 2025-07-22 23:00 UTC (permalink / raw)
To: LKML, Linux trace kernel
Cc: Masami Hiramatsu, Mathieu Desnoyers, Ingo Molnar, Peter Zijlstra,
Vincent Guittot, Dietmar Eggemann, Mel Gorman, Valentin Schneider
On Tue, 22 Jul 2025 10:48:20 -0400
Steven Rostedt <rostedt@goodmis.org> wrote:
> From: Steven Rostedt <rostedt@goodmis.org>
>
> The trace events sched_move_numa, sched_swap_numa and sched_stick_numa are
> only used when CONFIG_NUMA_BALANCING is enabled. Put an #ifdef guard
> around the definitions of these trace events so they are not defined when
> numa balancing is not enabled, otherwise they waste a bit of memory being
> unused.
>
I just noticed that I already sent out a version of this patch here:
https://lore.kernel.org/linux-trace-kernel/20250612100552.39672cf9@batman.local.home/
Which is a better version than this one.
> Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
> ---
> include/trace/events/sched.h | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/include/trace/events/sched.h b/include/trace/events/sched.h
> index 4e6b2910cec3..51776b45549a 100644
> --- a/include/trace/events/sched.h
> +++ b/include/trace/events/sched.h
> @@ -628,6 +628,7 @@ TRACE_EVENT(sched_process_hang,
> );
> #endif /* CONFIG_DETECT_HUNG_TASK */
>
> +#ifdef CONFIG_NUMA_BALANCING
> /*
> * Tracks migration of tasks from one runqueue to another. Can be used to
> * detect if automatic NUMA balancing is bouncing between nodes.
> @@ -719,6 +720,7 @@ DEFINE_EVENT(sched_numa_pair_template, sched_swap_numa,
>
> TP_ARGS(src_tsk, src_cpu, dst_tsk, dst_cpu)
> );
> +#endif /* CONFIG_NUMA_BALANCING */
>
> #ifdef CONFIG_NUMA_BALANCING
Because You can just remove the above two CPP directives.
So please ignore this one.
-- Steve
> #define NUMAB_SKIP_REASON \
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-07-22 23:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-22 14:48 [PATCH] tracing: sched: Hide numa balancing trace events Steven Rostedt
2025-07-22 23:00 ` Steven Rostedt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).