* [PATCH] tracing: sched: Hide numa events under CONFIG_NUMA_BALANCING
@ 2025-06-12 14:05 Steven Rostedt
2025-07-23 9:44 ` Shrikanth Hegde
0 siblings, 1 reply; 3+ messages in thread
From: Steven Rostedt @ 2025-06-12 14:05 UTC (permalink / raw)
To: LKML, Linux trace kernel
Cc: Masami Hiramatsu, Mathieu Desnoyers, Peter Zijlstra
From: Steven Rostedt <rostedt@goodmis.org>
The events sched_move_numa, sched_stick_numa and sched_swap_numa are only
called when CONFIG_NUMA_BALANCING is configured. As each event can take up
to 5K of memory in text and meta data regardless if they are used or not,
they should not be defined when used.
Move the #ifdef CONFIG_NUMA_BALANCING to hide these events as well.
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
---
Note, I will be adding code soon that will make unused events cause a warning.
include/trace/events/sched.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/trace/events/sched.h b/include/trace/events/sched.h
index 4e6b2910cec3..0243f32e068a 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.
@@ -720,7 +721,6 @@ DEFINE_EVENT(sched_numa_pair_template, sched_swap_numa,
TP_ARGS(src_tsk, src_cpu, dst_tsk, dst_cpu)
);
-#ifdef CONFIG_NUMA_BALANCING
#define NUMAB_SKIP_REASON \
EM( NUMAB_SKIP_UNSUITABLE, "unsuitable" ) \
EM( NUMAB_SKIP_SHARED_RO, "shared_ro" ) \
--
2.47.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] tracing: sched: Hide numa events under CONFIG_NUMA_BALANCING
2025-06-12 14:05 [PATCH] tracing: sched: Hide numa events under CONFIG_NUMA_BALANCING Steven Rostedt
@ 2025-07-23 9:44 ` Shrikanth Hegde
2025-07-25 13:00 ` Steven Rostedt
0 siblings, 1 reply; 3+ messages in thread
From: Shrikanth Hegde @ 2025-07-23 9:44 UTC (permalink / raw)
To: Steven Rostedt
Cc: Masami Hiramatsu, Mathieu Desnoyers, Peter Zijlstra, LKML,
Linux trace kernel
On 6/12/25 19:35, Steven Rostedt wrote:
> From: Steven Rostedt <rostedt@goodmis.org>
>
> The events sched_move_numa, sched_stick_numa and sched_swap_numa are only
> called when CONFIG_NUMA_BALANCING is configured. As each event can take up
> to 5K of memory in text and meta data regardless if they are used or not,
> they should not be defined when used.
they should be defined when used?
>
> Move the #ifdef CONFIG_NUMA_BALANCING to hide these events as well.
>
> Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
> ---
> Note, I will be adding code soon that will make unused events cause a warning.
>
> include/trace/events/sched.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/include/trace/events/sched.h b/include/trace/events/sched.h
> index 4e6b2910cec3..0243f32e068a 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.
> @@ -720,7 +721,6 @@ DEFINE_EVENT(sched_numa_pair_template, sched_swap_numa,
> TP_ARGS(src_tsk, src_cpu, dst_tsk, dst_cpu)
> );
>
> -#ifdef CONFIG_NUMA_BALANCING
> #define NUMAB_SKIP_REASON \
> EM( NUMAB_SKIP_UNSUITABLE, "unsuitable" ) \
> EM( NUMAB_SKIP_SHARED_RO, "shared_ro" ) \
Reviewed-by: Shrikanth Hegde <sshegde@linux.ibm.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] tracing: sched: Hide numa events under CONFIG_NUMA_BALANCING
2025-07-23 9:44 ` Shrikanth Hegde
@ 2025-07-25 13:00 ` Steven Rostedt
0 siblings, 0 replies; 3+ messages in thread
From: Steven Rostedt @ 2025-07-25 13:00 UTC (permalink / raw)
To: Shrikanth Hegde
Cc: Masami Hiramatsu, Mathieu Desnoyers, Peter Zijlstra, LKML,
Linux trace kernel
On Wed, 23 Jul 2025 15:14:26 +0530
Shrikanth Hegde <sshegde@linux.ibm.com> wrote:
> On 6/12/25 19:35, Steven Rostedt wrote:
> > From: Steven Rostedt <rostedt@goodmis.org>
> >
> > The events sched_move_numa, sched_stick_numa and sched_swap_numa are only
> > called when CONFIG_NUMA_BALANCING is configured. As each event can take up
> > to 5K of memory in text and meta data regardless if they are used or not,
> > they should not be defined when used.
>
> they should be defined when used?
That was supposed to be: "they should not be defined when unused."
Thanks for pointing it out.
>
> Reviewed-by: Shrikanth Hegde <sshegde@linux.ibm.com>
Thanks!
-- Steve
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-07-25 13:00 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-12 14:05 [PATCH] tracing: sched: Hide numa events under CONFIG_NUMA_BALANCING Steven Rostedt
2025-07-23 9:44 ` Shrikanth Hegde
2025-07-25 13: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).