From patchwork Thu Sep 26 22:48:52 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frederic Weisbecker X-Patchwork-Id: 13813705 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 54FEB1B07BF; Thu, 26 Sep 2024 22:49:25 +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=1727390965; cv=none; b=LLF+1fLOdZi8paQofzIxaIWLiP/vf6IrpjDkLkYPJp4UkI/gkAN7QSMwqNfXiABYrBY24rvigLNOoczSjtb/ascr+/1CasPhVdFbnYH53CJ2N/S7f0sUV0FvZjY+r0si0vXilYS1jFTjH0hjUrLynheZCSj+f1UZgPCN51vOfYE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727390965; c=relaxed/simple; bh=4yWGGyiLUE5LgminEo1+3BKAknZRJAj6SQQ4Ov4Yt6k=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=lf26gn/AzLITM2H953HGO9zsxTUuUmbD0S9OYJcL2ztW2YSpVT/JgpABYoSVirMJf3YnHyeXMH8wzRVdzyWiP4gCQumfxDrTJrw6K9lFG8JPSCk/8IOyXDvy0tyEm1Dz0PtqvJv1k8AEJi0H9OlMfEIslGCYEA5UBGVvdydFAzY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=k564yRZp; 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="k564yRZp" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0EB30C4CED1; Thu, 26 Sep 2024 22:49:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1727390965; bh=4yWGGyiLUE5LgminEo1+3BKAknZRJAj6SQQ4Ov4Yt6k=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=k564yRZp8pOLJHoBbfm/GOdk2+Caaj7NNScqdhv/mPScQTthzq01ka8TAu7kEpL1n Q0/UkRBBoC+BGKtg8+S4xroXlOOc5LjCUvtwXglhSiVAyHpl7QL2rnSxvk85hGrZ7+ yjs6fFuMhLz/oi6EdW1RqmT4Y2H5t6fyXa8Q4rae/mLsKyZMWTlIT3/lITiTin4s/b gIqsiriOY21JwYw+99K2acb54RBMWSEvtuYQl6KHUiqgbVcHhmX3Ws2REz388v2Y1D 9JTpvXwG/AURaqzkzmaksZhL8ExMpD6roOHA8c4CUn7+FJtI5DVQji79/NN2ctqZkt Q4uRPdzMxV82A== 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, 27 Sep 2024 00:48:52 +0200 Message-ID: <20240926224910.11106-5-frederic@kernel.org> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240926224910.11106-1-frederic@kernel.org> References: <20240926224910.11106-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 f49783b89d04..36126030e76d 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 Thu Sep 26 22:48:53 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frederic Weisbecker X-Patchwork-Id: 13813706 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 613AF1B140D; Thu, 26 Sep 2024 22:49:27 +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=1727390968; cv=none; b=kci0CCR0gxFZ1wWme+xR0ybKW9b9n1/kzOAOpbO6of6blHMf9uUlSGKEWjo2NwpdZpU7Wmk2pJF5kAj2zogrmdEA4qGkbOFnR0UCUf10/9YrcggsJYO5BhVX0ByD8Wqkv/rbdtytSsa/IkGxEwFvtwAnVu/D8tFPabjQg63XOAU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727390968; c=relaxed/simple; bh=LFXpL5/nrAXstPiOj0IbxTit69TGzKOpoS47R1I/bUE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=M54J4GhQS6OgIC6tbgNnpLdi7eI/hn9UpdAqmh6F38twV36ChvaBngfyBT89bAe3IgR8sqBRFAJqHVTjkp+uDkxcxA0vUY/5mXnYKHk4bjXCJTBnvrOPo3vBY+4w5ZKgDbcfzBB/6cmTkVuI00cU3H9EMUZncLw57QOybz1JAbA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=NmBba2Un; 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="NmBba2Un" Received: by smtp.kernel.org (Postfix) with ESMTPSA id AF0F3C4CEC9; Thu, 26 Sep 2024 22:49:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1727390967; bh=LFXpL5/nrAXstPiOj0IbxTit69TGzKOpoS47R1I/bUE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=NmBba2UnkZIb9p6p1rdb6P8aQjl7oareIrQ/4NATZEsBVRZPvbzcwJ/17rvFdqNF7 nh9SMwxXzKEbJrwdEzlB+Ic6vxFBVSF9EoJC83mwgn5m0WDFtBQUHbNMUg6aQAFgP3 I7FRMUdm0a6+mxHwLRxQXfGdtmicY62IkURK7hiP5lUIi3zIo6mjUGqxaRiEsTfYHw DryZHn1hDRxSO0e3ICeZG7QU0t59qbS2vGn6qzwO279/DrCTJRytQkPWwU4BUlRFXi CBqEE2XNowZhHd2s452qZlR9tKpsg5Cow1O6Ey4fvHl/0RxKmU6tyZce4F8Cv1BFTb wgwSCjvGBPZAw== 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, 27 Sep 2024 00:48:53 +0200 Message-ID: <20240926224910.11106-6-frederic@kernel.org> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240926224910.11106-1-frederic@kernel.org> References: <20240926224910.11106-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 Thu Sep 26 22:48:54 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frederic Weisbecker X-Patchwork-Id: 13813722 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 EDFE81B1436; Thu, 26 Sep 2024 22:49:30 +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=1727390972; cv=none; b=tzM1JkT7CfGlJVH4nkwGMufAPhHY24Es9TjQI3ZLqZyQyScEp/51+xUoVnpZSPjq0wWtGwMIblkamWKfJ86sGfk4TMLHhRgMauH3V+C1EYJ3wxvq+5FTS0vGILVrLJcpBiOujxHSXrT7E9wzRSF4FKN5LSENhvqi+ilGDmUvSXc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727390972; c=relaxed/simple; bh=5gm2IlkjuHTv5aCOZyyCN0NSeTSEuIS/Liq2NVx+RNo=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ukIn9MV3Q+WChj/73PAzqUMpReu6QpJwWWRyLs3iAKQSICXwcOE0Cdhh+16lXlEDxP3zZjdkF+LqJkf5kkW5kepSUpfKSq6AYURZUE33Lt5AlZHPms1cIyRpa+jiL0jlaijMmQ+ffY/vikUcUleRyUFLK+JTHIZ5muNgT3gsS7c= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=AsPooocQ; 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="AsPooocQ" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4093BC4CECE; Thu, 26 Sep 2024 22:49:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1727390970; bh=5gm2IlkjuHTv5aCOZyyCN0NSeTSEuIS/Liq2NVx+RNo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=AsPooocQwt6AD8CjWHTD1VqXF5cvd1y5cvFsThSUgXIJCfXz9YWinQqcGbR4R+dvJ 2oCDFGGPInTDzYMwAV1CSWmKPKa2TVB24H73pIVQfK+nNkSYqgJSwdBKCNnImexAyv Z8f4UhBLpTR4YhmCah+PiC6wmo5pfR2GrXeQoHC/X2YNgMq6wj6w1G0Rd8f5y+DOYn J92vGX7gLWj27Kh0wRf6CH6oAybPa8FsvvncfoYCQ9GumuzPoC0/3eFcEo+Yuiy/4q PoDjTE89r79OjbiG0O1UpdzHuUPE0zFlnIIHWlFGnZpaUmFxtyn76HkrRRQ10rktpq Ak2+2K498ZSug== 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, 27 Sep 2024 00:48:54 +0200 Message-ID: <20240926224910.11106-7-frederic@kernel.org> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240926224910.11106-1-frederic@kernel.org> References: <20240926224910.11106-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 c5aec26019d6..4b2a9cd811c4 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;