All of lore.kernel.org
 help / color / mirror / Atom feed
From: Cai Huoqing <caihuoqing@baidu.com>
To: <rostedt@goodmis.org>
Cc: Cai Huoqing <caihuoqing@baidu.com>,
	Bernard Metzler <bmt@zurich.ibm.com>,
	Doug Ledford <dledford@redhat.com>,
	Jason Gunthorpe <jgg@ziepe.ca>,
	"Davidlohr Bueso" <dave@stgolabs.net>,
	"Paul E. McKenney" <paulmck@kernel.org>,
	"Josh Triplett" <josh@joshtriplett.org>,
	Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
	Lai Jiangshan <jiangshanlai@gmail.com>,
	Joel Fernandes <joel@joelfernandes.org>,
	Ingo Molnar <mingo@redhat.com>,
	Daniel Bristot de Oliveira <bristot@kernel.org>,
	<linux-rdma@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	<rcu@vger.kernel.org>
Subject: [PATCH v3 2/6] RDMA/siw: Make use of the helper function kthread_run_on_cpu()
Date: Fri, 22 Oct 2021 10:57:05 +0800	[thread overview]
Message-ID: <20211022025711.3673-3-caihuoqing@baidu.com> (raw)
In-Reply-To: <20211022025711.3673-1-caihuoqing@baidu.com>

Replace kthread_create/kthread_bind/wake_up_process()
with kthread_run_on_cpu() to simplify the code.

Signed-off-by: Cai Huoqing <caihuoqing@baidu.com>
---
 drivers/infiniband/sw/siw/siw_main.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/infiniband/sw/siw/siw_main.c b/drivers/infiniband/sw/siw/siw_main.c
index 9093e6a80b26..e5c586913d0b 100644
--- a/drivers/infiniband/sw/siw/siw_main.c
+++ b/drivers/infiniband/sw/siw/siw_main.c
@@ -98,15 +98,14 @@ static int siw_create_tx_threads(void)
 			continue;
 
 		siw_tx_thread[cpu] =
-			kthread_create(siw_run_sq, (unsigned long *)(long)cpu,
-				       "siw_tx/%d", cpu);
+			kthread_run_on_cpu(siw_run_sq,
+					   (unsigned long *)(long)cpu,
+					   cpu, "siw_tx/%u");
 		if (IS_ERR(siw_tx_thread[cpu])) {
 			siw_tx_thread[cpu] = NULL;
 			continue;
 		}
-		kthread_bind(siw_tx_thread[cpu], cpu);
 
-		wake_up_process(siw_tx_thread[cpu]);
 		assigned++;
 	}
 	return assigned;
-- 
2.25.1


  parent reply	other threads:[~2021-10-22  2:59 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-22  2:57 [PATCH v3 0/6] kthread: Add the helper function kthread_run_on_cpu() Cai Huoqing
2021-10-22  2:57 ` [PATCH v3 1/6] " Cai Huoqing
2021-10-26  8:32   ` Cai,Huoqing
2021-11-16 21:01     ` Steven Rostedt
2021-10-22  2:57 ` Cai Huoqing [this message]
2021-11-10  6:44   ` [PATCH v3 2/6] RDMA/siw: Make use of " kernel test robot
2021-10-22  2:57 ` [PATCH v3 3/6] ring-buffer: " Cai Huoqing
2021-10-22  2:57 ` [PATCH v3 4/6] rcutorture: " Cai Huoqing
2021-11-07 19:24   ` kernel test robot
2021-11-07 19:24     ` kernel test robot
2021-10-22  2:57 ` [PATCH v3 5/6] trace/osnoise: " Cai Huoqing
2021-10-22  2:57 ` [PATCH v3 6/6] trace/hwlat: " Cai Huoqing

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=20211022025711.3673-3-caihuoqing@baidu.com \
    --to=caihuoqing@baidu.com \
    --cc=bmt@zurich.ibm.com \
    --cc=bristot@kernel.org \
    --cc=dave@stgolabs.net \
    --cc=dledford@redhat.com \
    --cc=jgg@ziepe.ca \
    --cc=jiangshanlai@gmail.com \
    --cc=joel@joelfernandes.org \
    --cc=josh@joshtriplett.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=mathieu.desnoyers@efficios.com \
    --cc=mingo@redhat.com \
    --cc=paulmck@kernel.org \
    --cc=rcu@vger.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 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.