[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20211022025711.3673-6-caihuoqing@baidu.com>
Date: Fri, 22 Oct 2021 10:57:08 +0800
From: Cai Huoqing <caihuoqing@...du.com>
To: <rostedt@...dmis.org>
CC: Cai Huoqing <caihuoqing@...du.com>,
Bernard Metzler <bmt@...ich.ibm.com>,
Doug Ledford <dledford@...hat.com>,
Jason Gunthorpe <jgg@...pe.ca>,
"Davidlohr Bueso" <dave@...olabs.net>,
"Paul E. McKenney" <paulmck@...nel.org>,
"Josh Triplett" <josh@...htriplett.org>,
Mathieu Desnoyers <mathieu.desnoyers@...icios.com>,
Lai Jiangshan <jiangshanlai@...il.com>,
Joel Fernandes <joel@...lfernandes.org>,
Ingo Molnar <mingo@...hat.com>,
Daniel Bristot de Oliveira <bristot@...nel.org>,
<linux-rdma@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
<rcu@...r.kernel.org>
Subject: [PATCH v3 5/6] trace/osnoise: Make use of the helper function kthread_run_on_cpu()
Replace kthread_create_on_cpu/wake_up_process()
with kthread_run_on_cpu() to simplify the code.
Signed-off-by: Cai Huoqing <caihuoqing@...du.com>
---
kernel/trace/trace_osnoise.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/kernel/trace/trace_osnoise.c b/kernel/trace/trace_osnoise.c
index ce053619f289..cbd78fd5e491 100644
--- a/kernel/trace/trace_osnoise.c
+++ b/kernel/trace/trace_osnoise.c
@@ -1525,7 +1525,7 @@ static int start_kthread(unsigned int cpu)
#else
snprintf(comm, 24, "osnoise/%d", cpu);
#endif
- kthread = kthread_create_on_cpu(main, NULL, cpu, comm);
+ kthread = kthread_run_on_cpu(main, NULL, cpu, comm);
if (IS_ERR(kthread)) {
pr_err(BANNER "could not start sampling thread\n");
@@ -1534,7 +1534,6 @@ static int start_kthread(unsigned int cpu)
}
per_cpu(per_cpu_osnoise_var, cpu).kthread = kthread;
- wake_up_process(kthread);
return 0;
}
--
2.25.1
Powered by blists - more mailing lists