From patchwork Fri Jul 26 21:56:40 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frederic Weisbecker X-Patchwork-Id: 13743188 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4A1761552FE; Fri, 26 Jul 2024 21:57:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722031036; cv=none; b=SvvZw7MpVIbFzwvKJNJ0wXvpLfASCUF5IooceT0v5GM07SyL8PDOJ8FL1j5XPfX6rERebrP57k3C17EqdC161mvmzftgkyLcdXg78QV/HNBLmZO4KLP55aDtUJIAe04vYpHFO3bJpbIXPibqHvPtfpbNNbu/H59P7Fjc4aXslaw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722031036; c=relaxed/simple; bh=yDztet0jee00Ipe/s5EJY6qHQwJ1DkD7Qxns7aI/l+o=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=R64IdnEbrcVoe8+wOrm7FBg+ibrM1Hc7rmKtCbHUbODnQiuZRFGhf9rJVr4Akhatg0A33/WKhUnA1aEKviOxZpg6rp2kzLlLwtkv8z5mc5rd+omPIFL8DiOb/tw0e0rFybjY1AvvFHQek7exPuIM38NN6FrcLyH/hq7sUsz/zkE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=GavtaFA8; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="GavtaFA8" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 63FD5C4AF0A; Fri, 26 Jul 2024 21:57:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1722031035; bh=yDztet0jee00Ipe/s5EJY6qHQwJ1DkD7Qxns7aI/l+o=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=GavtaFA8yIc1xKeXM/ayPWrKoyOXfjnnpLhLizLKSSnJp99gaIWXaoSesmUSvWDrK DDpFz5O3ow0e/AnZoycPeTzQ3R6o44T9efOT5wURIBIsTg4K3HdXZHss2kdBg8zpV0 QbczJLW7AmY8wHFIBo3P316kXQergQRc9HXiYj+oyTFHfLjVI4RIiz4WA/cJc9yubr /92aqFaqkVOrNlXgf2HSCmVkzuSCdcg4MLK8u9D8SrSvt8Hta0BtGXUvb/PjrIMRDW YOWr/Xef2AbSP7ijf4u4BBsbfPzZ9FKXKQcOu6SxUoxR/YNokmQskii+hubSgi3gRA OtP3dZKEdiOhg== From: Frederic Weisbecker To: LKML Cc: Frederic Weisbecker , Saurav Kashyap , Javed Hasan , GR-QLogic-Storage-Upstream@marvell.com, "James E.J. Bottomley" , "Martin K. Petersen" , linux-scsi@vger.kernel.org, Andrew Morton , Peter Zijlstra , Thomas Gleixner Subject: [PATCH 04/20] scsi: bnx2fc: Use kthread_create_on_cpu() Date: Fri, 26 Jul 2024 23:56:40 +0200 Message-ID: <20240726215701.19459-5-frederic@kernel.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240726215701.19459-1-frederic@kernel.org> References: <20240726215701.19459-1-frederic@kernel.org> Precedence: bulk X-Mailing-List: linux-scsi@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Use the proper API instead of open coding it. However it looks like bnx2fc_percpu_io_thread() kthread could be replaced by the use of a high prio workqueue instead. Signed-off-by: Frederic Weisbecker --- drivers/scsi/bnx2fc/bnx2fc_fcoe.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/scsi/bnx2fc/bnx2fc_fcoe.c b/drivers/scsi/bnx2fc/bnx2fc_fcoe.c index 1078c20c5ef6..789c155b939d 100644 --- a/drivers/scsi/bnx2fc/bnx2fc_fcoe.c +++ b/drivers/scsi/bnx2fc/bnx2fc_fcoe.c @@ -2610,14 +2610,11 @@ static int bnx2fc_cpu_online(unsigned int cpu) p = &per_cpu(bnx2fc_percpu, cpu); - thread = kthread_create_on_node(bnx2fc_percpu_io_thread, - (void *)p, cpu_to_node(cpu), - "bnx2fc_thread/%d", cpu); + thread = kthread_create_on_cpu(bnx2fc_percpu_io_thread, + (void *)p, cpu, "bnx2fc_thread/%d"); if (IS_ERR(thread)) return PTR_ERR(thread); - /* bind thread to the cpu */ - kthread_bind(thread, cpu); p->iothread = thread; wake_up_process(thread); return 0; From patchwork Fri Jul 26 21:56:41 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frederic Weisbecker X-Patchwork-Id: 13743189 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 27DC9155385; Fri, 26 Jul 2024 21:57:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722031039; cv=none; b=KrSnKfE1d36moAKugXggswOCaTImNhFepmPNauSwXwdWbCyulSiOtkJD1ABgFVoPoCh01s92+qhc8tPq2tbi94I0rppBj86McOute5E74PACog1f51nB61Ny5EEqXytBKsSiGeue14dT5zYWXyGVK7T+KuU3HRCkMTPiMeZw/Xk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722031039; c=relaxed/simple; bh=OdAmLrtcC1w3Cxa06wD8vbSjhHVtYldnsGlOoNisnoA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=gu1QHPHLq8Gr6ov41hX6Tdw/VsQ7oImDnB3FP1kU56SSipfcVuhuI8lalvqUGhvAYxqBKtZl/xNstn1S95hIxAHrz4Pd9pGfO9f+w32NNzHdji4djSCcC56faeScdcaNqG/GfXHucV0FDTmKDxZo4+AaYpYF+8KyhJHBJ1i5wQA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=OBpAWcdP; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="OBpAWcdP" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3181BC4AF09; Fri, 26 Jul 2024 21:57:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1722031038; bh=OdAmLrtcC1w3Cxa06wD8vbSjhHVtYldnsGlOoNisnoA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=OBpAWcdPUAbdar3RhuqK72OujDWsU1hnIBOH7SkrnuNMROENbGJxtz156klFJVppZ ylojY+psSgnSbanDF9YGu67qObcLJGP1SHyRc16qeqE0A0FgEEyPtff/lVAdZt/L7A kSSIW0VbkL+RGzO+wWXv1Y98jmapJvAPpLSnsIypd+e2v4A/M7Atmd+nK8trttEtXc czEnAamfVdDOYMHDMvg7t3qHMh8iW9Q9xOju8VECluNTM4fm7MJJLQbv0ESiqgLxPC Yr0u8eubBrUC9trSr87J5GDs7EBWtREJoF6R35028taf5ITM+Sg1/CLfGgX/UcKBw3 AhuY7JQSiBXXQ== From: Frederic Weisbecker To: LKML Cc: Frederic Weisbecker , Nilesh Javali , Manish Rangankar , GR-QLogic-Storage-Upstream@marvell.com, "James E.J. Bottomley" , "Martin K. Petersen" , linux-scsi@vger.kernel.org, Andrew Morton , Peter Zijlstra , Thomas Gleixner Subject: [PATCH 05/20] scsi: bnx2i: Use kthread_create_on_cpu() Date: Fri, 26 Jul 2024 23:56:41 +0200 Message-ID: <20240726215701.19459-6-frederic@kernel.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240726215701.19459-1-frederic@kernel.org> References: <20240726215701.19459-1-frederic@kernel.org> Precedence: bulk X-Mailing-List: linux-scsi@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Use the proper API instead of open coding it. However it looks like bnx2i_percpu_io_thread() kthread could be replaced by the use of a high prio workqueue instead. Signed-off-by: Frederic Weisbecker --- drivers/scsi/bnx2i/bnx2i_init.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/scsi/bnx2i/bnx2i_init.c b/drivers/scsi/bnx2i/bnx2i_init.c index 872ad37e2a6e..cecc3a026762 100644 --- a/drivers/scsi/bnx2i/bnx2i_init.c +++ b/drivers/scsi/bnx2i/bnx2i_init.c @@ -415,14 +415,11 @@ static int bnx2i_cpu_online(unsigned int cpu) p = &per_cpu(bnx2i_percpu, cpu); - thread = kthread_create_on_node(bnx2i_percpu_io_thread, (void *)p, - cpu_to_node(cpu), - "bnx2i_thread/%d", cpu); + thread = kthread_create_on_cpu(bnx2i_percpu_io_thread, (void *)p, + cpu, "bnx2i_thread/%d"); if (IS_ERR(thread)) return PTR_ERR(thread); - /* bind thread to the cpu */ - kthread_bind(thread, cpu); p->iothread = thread; wake_up_process(thread); return 0; From patchwork Fri Jul 26 21:56:42 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frederic Weisbecker X-Patchwork-Id: 13743190 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B6AEE155A21; Fri, 26 Jul 2024 21:57:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722031041; cv=none; b=m0f1SA7st6jk17JFIU9lBpDoqsZJduHq7H5NmcRkUlndZwXfZ9X8IBRt52714ANMjZegid66/UZK0liyQwsK6tGA5N+kKQVyW5wwGgKCYO4t25edVcqiDMsCtLxK505Z+tyxLjYx6XLXkpKC7ebK6UrHO1ngKO6tcqSts4rgIvM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722031041; c=relaxed/simple; bh=/RulNbNlovlYsV+8HlxUGhpAD5m4gMOyHvdHkAFhJrE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=nrwO8DIC6fRqm/mZvx9hfNiZmi3a04htFSqHYPKLFCdS+KitkUawC1JY0Infs/XnM/sNxtf3ax5gUhI/aiprYjHT5q6yRwFcrRcYACBUvbta9GCtuvsxL65xPxQ1dZWs6I5P/QZhjWUCMxK6Z42nNLgE5GWz/5pKtui2pBXIhjQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=ENHW0rS0; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="ENHW0rS0" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1A1DFC4AF12; Fri, 26 Jul 2024 21:57:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1722031041; bh=/RulNbNlovlYsV+8HlxUGhpAD5m4gMOyHvdHkAFhJrE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ENHW0rS02/kad5POLgck+he3vIm6aP6gzNJ13rtT0DHih+ZjZetNfHh+e4DQ20tT2 y9LKilMGULebYDWFCINkLJEgzje6QSqvzjAs5s/NAvFyJkVSGv6OQbG7VYPt7OEFQ9 CkDNE4j5FU3QgVKQ8zxHODULdDFakmoI4xEhYf6VKIjzPyLMxdC8GS9Z0D/rZFWlug k6DydeWF7yAcaXRwhtQqr/2iGXg5w7PN+GT8+zZFsQdJNpBGYGD6JZiuXMz015EYQ2 JfI8sZqq8rfi4MxW9ZXBvJ7k2w2NdFNuf7ZH4ml4vO9+4Q+Z8DCg1GymSxDAOMzO5S iJd4+yLvVImiQ== From: Frederic Weisbecker To: LKML Cc: Frederic Weisbecker , Nilesh Javali , Manish Rangankar , GR-QLogic-Storage-Upstream@marvell.com, "James E.J. Bottomley" , "Martin K. Petersen" , linux-scsi@vger.kernel.org, Andrew Morton , Peter Zijlstra , Thomas Gleixner Subject: [PATCH 06/20] scsi: qedi: Use kthread_create_on_cpu() Date: Fri, 26 Jul 2024 23:56:42 +0200 Message-ID: <20240726215701.19459-7-frederic@kernel.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240726215701.19459-1-frederic@kernel.org> References: <20240726215701.19459-1-frederic@kernel.org> Precedence: bulk X-Mailing-List: linux-scsi@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Use the proper API instead of open coding it. However it looks like qedi_percpu_io_thread() kthread could be replaced by the use of a high prio workqueue instead. Signed-off-by: Frederic Weisbecker --- drivers/scsi/qedi/qedi_main.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/scsi/qedi/qedi_main.c b/drivers/scsi/qedi/qedi_main.c index cd0180b1f5b9..f30e27bb2233 100644 --- a/drivers/scsi/qedi/qedi_main.c +++ b/drivers/scsi/qedi/qedi_main.c @@ -1960,13 +1960,11 @@ static int qedi_cpu_online(unsigned int cpu) struct qedi_percpu_s *p = this_cpu_ptr(&qedi_percpu); struct task_struct *thread; - thread = kthread_create_on_node(qedi_percpu_io_thread, (void *)p, - cpu_to_node(cpu), - "qedi_thread/%d", cpu); + thread = kthread_create_on_cpu(qedi_percpu_io_thread, (void *)p, + cpu, "qedi_thread/%d"); if (IS_ERR(thread)) return PTR_ERR(thread); - kthread_bind(thread, cpu); p->iothread = thread; wake_up_process(thread); return 0;