Thread (50 messages) 50 messages, 4 authors, 2021-06-15

Re: [PATCH V3 4/9] tracing/hwlat: Implement the per-cpu mode

From: Daniel Bristot de Oliveira <hidden>
Date: 2021-05-27 12:29:21
Also in: lkml

On 5/27/21 1:58 PM, Juri Lelli wrote:
Hi,

On 14/05/21 22:51, Daniel Bristot de Oliveira wrote:

[...]
quoted
+/**
+ * start_per_cpu_kthread - Kick off the hardware latency sampling/detector kthreads
+ *
+ * This starts the kernel threads that will sit on potentially all cpus and
+ * sample the CPU timestamp counter (TSC or similar) and look for potential
+ * hardware latencies.
+ */
+static int start_per_cpu_kthreads(struct trace_array *tr)
+{
+	struct cpumask *current_mask = &save_cpumask;
+	struct cpumask *this_cpumask;
+	struct task_struct *kthread;
+	char comm[24];
+	int cpu;
+
+	if (!alloc_cpumask_var(&this_cpumask, GFP_KERNEL))
+		return -ENOMEM;
Is this_cpumask actually used anywhere?
OOpppsss, this is a left-over :-(....

Before starting using kthread_create_on_cpu(), I was using this_cpumask to set
the affinity of threads created via kthread_create().... but it is not needed
anymore.

I will remove it, good catch.

Thanks!
-- Daniel
Thanks,
Juri
  
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help