All of lore.kernel.org
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: linux-kernel@vger.kernel.org
Cc: Masami Hiramatsu <mhiramat@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	stable@vger.kernel.org, Tero Kristo <tero.kristo@linux.intel.com>,
	Daniel Bristot de Oliveira <bristot@kernel.org>
Subject: [for-linus][PATCH 3/8] trace/hwlat: Do not wipe the contents of per-cpu thread data
Date: Sun, 19 Mar 2023 12:46:46 -0400	[thread overview]
Message-ID: <20230319164748.290057187@goodmis.org> (raw)
In-Reply-To: 20230319164643.513018619@goodmis.org

From: Tero Kristo <tero.kristo@linux.intel.com>

Do not wipe the contents of the per-cpu kthread data when starting the
tracer, as this will completely forget about already running instances
and can later start new additional per-cpu threads.

Link: https://lore.kernel.org/all/20230302113654.2984709-1-tero.kristo@linux.intel.com/
Link: https://lkml.kernel.org/r/20230310100451.3948583-2-tero.kristo@linux.intel.com

Cc: stable@vger.kernel.org
Fixes: f46b16520a087 ("trace/hwlat: Implement the per-cpu mode")
Signed-off-by: Tero Kristo <tero.kristo@linux.intel.com>
Acked-by: Daniel Bristot de Oliveira <bristot@kernel.org>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
---
 kernel/trace/trace_hwlat.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/kernel/trace/trace_hwlat.c b/kernel/trace/trace_hwlat.c
index d440ddd5fd8b..edc26dc22c3f 100644
--- a/kernel/trace/trace_hwlat.c
+++ b/kernel/trace/trace_hwlat.c
@@ -584,9 +584,6 @@ static int start_per_cpu_kthreads(struct trace_array *tr)
 	 */
 	cpumask_and(current_mask, cpu_online_mask, tr->tracing_cpumask);
 
-	for_each_online_cpu(cpu)
-		per_cpu(hwlat_per_cpu_data, cpu).kthread = NULL;
-
 	for_each_cpu(cpu, current_mask) {
 		retval = start_cpu_kthread(cpu);
 		if (retval)
-- 
2.39.1

  parent reply	other threads:[~2023-03-19 16:47 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-19 16:46 [for-linus][PATCH 0/8] tracing: Minor fixes for 6.3 Steven Rostedt
2023-03-19 16:46 ` [for-linus][PATCH 1/8] tracing: Fix wrong return in kprobe_event_gen_test.c Steven Rostedt
2023-03-19 16:46 ` [for-linus][PATCH 2/8] tracing/osnoise: set several trace_osnoise.c variables storage-class-specifier to static Steven Rostedt
2023-03-19 16:46 ` Steven Rostedt [this message]
2023-03-19 16:46 ` [for-linus][PATCH 4/8] trace/hwlat: Do not start per-cpu thread if it is already running Steven Rostedt
2023-03-19 16:46 ` [for-linus][PATCH 5/8] ftrace: Set direct_ops storage-class-specifier to static Steven Rostedt
2023-03-19 16:46 ` [for-linus][PATCH 6/8] tracing: Make splice_read available again Steven Rostedt
2023-03-19 16:46 ` [for-linus][PATCH 7/8] ring-buffer: remove obsolete comment for free_buffer_page() Steven Rostedt
2023-03-19 16:46 ` [for-linus][PATCH 8/8] tracing/hwlat: Replace sched_setaffinity with set_cpus_allowed_ptr 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=20230319164748.290057187@goodmis.org \
    --to=rostedt@goodmis.org \
    --cc=akpm@linux-foundation.org \
    --cc=bristot@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mhiramat@kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=tero.kristo@linux.intel.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.