[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20211022025711.3673-5-caihuoqing@baidu.com>
Date: Fri, 22 Oct 2021 10:57:07 +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 4/6] rcutorture: Make use of the helper function kthread_run_on_cpu()
Replace kthread_create_on_node/kthread_bind/wake_up_process()
with kthread_run_on_cpu() to simplify the code.
Signed-off-by: Cai Huoqing <caihuoqing@...du.com>
---
kernel/rcu/rcutorture.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/kernel/rcu/rcutorture.c b/kernel/rcu/rcutorture.c
index 503e14e62e8f..6c3ba8c0d7ff 100644
--- a/kernel/rcu/rcutorture.c
+++ b/kernel/rcu/rcutorture.c
@@ -2025,9 +2025,8 @@ static int rcutorture_booster_init(unsigned int cpu)
mutex_lock(&boost_mutex);
rcu_torture_disable_rt_throttle();
VERBOSE_TOROUT_STRING("Creating rcu_torture_boost task");
- boost_tasks[cpu] = kthread_create_on_node(rcu_torture_boost, NULL,
- cpu_to_node(cpu),
- "rcu_torture_boost");
+ boost_tasks[cpu] = kthread_run_on_cpu(rcu_torture_boost, NULL,
+ cpu, "rcu_torture_boost_%u");
if (IS_ERR(boost_tasks[cpu])) {
retval = PTR_ERR(boost_tasks[cpu]);
VERBOSE_TOROUT_STRING("rcu_torture_boost task create failed");
@@ -2036,8 +2035,6 @@ static int rcutorture_booster_init(unsigned int cpu)
mutex_unlock(&boost_mutex);
return retval;
}
- kthread_bind(boost_tasks[cpu], cpu);
- wake_up_process(boost_tasks[cpu]);
mutex_unlock(&boost_mutex);
return 0;
}
--
2.25.1
Powered by blists - more mailing lists