public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Tero Kristo <tero.kristo@linux.intel.com>
To: rostedt@goodmis.org, bristot@kernel.org, mhiramat@kernel.org
Cc: linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org
Subject: [PATCHv2 1/2] trace/hwlat: Do not wipe the contents of per-cpu thread data
Date: Fri, 10 Mar 2023 12:04:50 +0200	[thread overview]
Message-ID: <20230310100451.3948583-2-tero.kristo@linux.intel.com> (raw)
In-Reply-To: <20230310100451.3948583-1-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.

Signed-off-by: Tero Kristo <tero.kristo@linux.intel.com>
---
v2:
  * split into separate patch

 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.25.1


  reply	other threads:[~2023-03-10 10:05 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-10 10:04 [PATCHv2 0/2] trace/hwlat: Prevent startup of multiple per-cpu threads Tero Kristo
2023-03-10 10:04 ` Tero Kristo [this message]
2023-03-10 13:52   ` [PATCHv2 1/2] trace/hwlat: Do not wipe the contents of per-cpu thread data Daniel Bristot de Oliveira
2023-03-10 10:04 ` [PATCHv2 2/2] trace/hwlat: Do not start per-cpu thread if it is already running Tero Kristo
2023-03-10 13:52   ` Daniel Bristot de Oliveira

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=20230310100451.3948583-2-tero.kristo@linux.intel.com \
    --to=tero.kristo@linux.intel.com \
    --cc=bristot@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-trace-kernel@vger.kernel.org \
    --cc=mhiramat@kernel.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