mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Shrikanth Hegde <sshegde@linux.ibm.com>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: Masami Hiramatsu <mhiramat@kernel.org>,
	Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
	Peter Zijlstra <peterz@infradead.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Linux trace kernel <linux-trace-kernel@vger.kernel.org>
Subject: Re: [PATCH] tracing: sched: Hide numa events under CONFIG_NUMA_BALANCING
Date: Wed, 23 Jul 2025 15:14:26 +0530	[thread overview]
Message-ID: <708b26cc-e888-44d1-a7eb-ba37dea23a89@linux.ibm.com> (raw)
In-Reply-To: <20250612100552.39672cf9@batman.local.home>



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>

  reply	other threads:[~2025-07-23  9:44 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-12 14:05 Steven Rostedt
2025-07-23  9:44 ` Shrikanth Hegde [this message]
2025-07-25 13:00   ` Steven Rostedt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=708b26cc-e888-44d1-a7eb-ba37dea23a89@linux.ibm.com \
    --to=sshegde@linux.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-trace-kernel@vger.kernel.org \
    --cc=mathieu.desnoyers@efficios.com \
    --cc=mhiramat@kernel.org \
    --cc=peterz@infradead.org \
    --cc=rostedt@goodmis.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®