From patchwork Wed Dec 11 15:40:16 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frederic Weisbecker X-Patchwork-Id: 849977 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 067D61D95AA; Wed, 11 Dec 2024 15:40:47 +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=1733931648; cv=none; b=DJxEAU60aYJB4scYkgeYPDt3IGReu3H2luSntA8dBjk3Nd7YoW5n8UqjXd+pX7dn9CZuLfOBPmLi6o+uyT9zZhDxFVC1JJTUBi7wVZlPL0cRoPNoa0g9VwJmHYp2RVSvfUlgTRkIIOyhJUi3KmV+wJXJFFzJ+Bh96zRMTOINOu0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733931648; c=relaxed/simple; bh=4yWGGyiLUE5LgminEo1+3BKAknZRJAj6SQQ4Ov4Yt6k=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=OqMHX/QzgTzkz3u+6GSV48zP8nZK2pmCTWFz+YspN5YbvGvw4MwRcjWiagQtMBIAQe+/eCYb/57bMtniFmg7c3jqW3grVOFTwZwkI/0GuTYQ7AId/H2P1sB9TSJidJBPsJ+oqGJyKvfUn8jJ/6LbkmGGBYw9pP4PkEU3ThEfbxM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=ErlILAdH; 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="ErlILAdH" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 401E1C4CED7; Wed, 11 Dec 2024 15:40:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1733931647; bh=4yWGGyiLUE5LgminEo1+3BKAknZRJAj6SQQ4Ov4Yt6k=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ErlILAdHdpKzRQEWd1brQRJ0ArES15hRgOLSBAthzpCpR/dr4hHoiXQ1U8BhJTpEr eAB6Cria3MJZLZ026mdIRWy7XVx1vqtF6ExJd94umA9gcYcrlMs1VZDHVE/hva4qva g89h5+mWb6SwpKgViZ/OHSJpE/XN6uJqnus0xkmmqrxQ2m72+miHEX9K0hXuzZOwAE 5neAr43OweoWOuw237wleqzU/MPMbVAg4Atth9fEk8u30LjDbZJ+hJmt9wgUgwhOyE 930Rodl7bzTfi+7tsBJrf4hywH90kWA9WrnAxLtKJQR3ItBgehSu8JuOW/YdHZzFrB bHkm35ZDx3Ung== 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 03/19] scsi: bnx2fc: Use kthread_create_on_cpu() Date: Wed, 11 Dec 2024 16:40:16 +0100 Message-ID: <20241211154035.75565-4-frederic@kernel.org> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20241211154035.75565-1-frederic@kernel.org> References: <20241211154035.75565-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 Wed Dec 11 15:40:17 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frederic Weisbecker X-Patchwork-Id: 849650 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 80B3E1DA11B; Wed, 11 Dec 2024 15:40:50 +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=1733931650; cv=none; b=HYnspQdyi5yt9wumudZvtK1lmyzc8ZORGvD83H6A1JR88ZXsDOffdpKI4QItQE2kdwP9vFm/+rMqlWBDM4wOGk7A6Ddyp2wMXiC/+Lqgje6nKn/svBZGDSlEDkXHW0pj77HQx0fpwQdWkai3GB5qopptl9YyKCyV05VhWa3DK+Y= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733931650; c=relaxed/simple; bh=LFXpL5/nrAXstPiOj0IbxTit69TGzKOpoS47R1I/bUE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=elQ0ZOS8lRD7ht9xXnA5u1ci0O/Pom0YvsPSJ2XJXRQX6WBS/D7BuohnIBVEBtl/M6rziisANeegahlElan1oLQZRrdKbV0SmKZBQriubM89rpNWO78ZjlYzkKFswaVCZ0b9eIq7km298a8T1nnBzWkXEWfhHUrv87MxlrkRJhA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=qKHzLkEM; 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="qKHzLkEM" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0DB2DC4CED2; Wed, 11 Dec 2024 15:40:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1733931650; bh=LFXpL5/nrAXstPiOj0IbxTit69TGzKOpoS47R1I/bUE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=qKHzLkEMhcHRIY0LX3GaPTQ+jtULnXufBTi5yhd8x3Ud6Wn0SEvkKR2V4GimohDbc SBcYYpUeD6mrHQnV3PB1bQKWsLQSe7qWwSleuPq9SKTCifyD3X3lB+9dAGj0qWm4Kn tlt4QD6C/UGxXgBLIE/OzFRbX7kllC3iZ5f1OtqgINURKVqKFQ5XXOTJrgb5DVjShq fEsVwxSKdAkRWdd5c5x6gjvIATxzC1zAs1H0al9cYiWZPtD+9uEwSEYK5rsgTnvxHO EWnyKYCBw61iizPXT7xFTwbtHNAm9xf6gWG+hr9Vwg8skujpu6w74StjWlFtwrOdKX FPzpf+7VHJKVg== 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 04/19] scsi: bnx2i: Use kthread_create_on_cpu() Date: Wed, 11 Dec 2024 16:40:17 +0100 Message-ID: <20241211154035.75565-5-frederic@kernel.org> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20241211154035.75565-1-frederic@kernel.org> References: <20241211154035.75565-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 Wed Dec 11 15:40:18 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frederic Weisbecker X-Patchwork-Id: 849976 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 8FB4F1DC999; Wed, 11 Dec 2024 15:40:53 +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=1733931654; cv=none; b=UlcqMBRC6e3fypEmCOVJTZB6kRD9Qg43f0gS3AaKNNJG9uM6DXvhM/lW7I0RF/G7chbUWskXVLINJ7XBi9TiZB6vxTE97P036UBo1+d5sJeEw1W3acpgvOl7ebn9DMN/A/9c+e3i559Qn0ueIzfIlrcb+knamXHHekXhd1qjM5Y= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733931654; c=relaxed/simple; bh=8evu9K6E5GzQx4Ei0JNqaBXa1Egs/UTLupfziVAOhhQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=RTCC9vai6fK9ZV0P2J9lZmOV+7kQo6C1eBr55acxNiL9NoITJi7HsQx8YkGR1VOO7ZxKrrgbkK5wn8/Kb8ax1MuawyRMZpbL/A+jgknWnbxsW8IwPHEgTogH1tFvpHUmHD4VmW1vWsdhSEZcSNTc1AXsFrhFPolARaPU/daS/Ao= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=s6ntzut6; 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="s6ntzut6" Received: by smtp.kernel.org (Postfix) with ESMTPSA id C8D29C4CED4; Wed, 11 Dec 2024 15:40:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1733931653; bh=8evu9K6E5GzQx4Ei0JNqaBXa1Egs/UTLupfziVAOhhQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=s6ntzut6wKAb9D/XcIGpxhpsKDJzAv/j3KZV7TRqVGndMQjodIhRFnHQERA+IENmZ hjVJhkPax9/SXwdtxtOLfqRkm7WnVw2Bmx+KZNYKd4rf6i+ZIcT1ZI/jVCuHN9+dBk twwDt7m+ugypNlkEREUt0AWI4+dad48ETFZDxAFQRQ/7NCVf0shpRU01PiaO7V3iZx 7DN+aZsQNj5XIPkQVOqlRvld+dMcIJ8M1hIGUnrmI4tZ7YhVH77SPUoUuSwHe/qpTu 9Ax+DfTVGI0I1TxMlCYLTwCDgdkR38P6O9JtwxqryUhLK+uue61bP00J3a0PHKeGlF CdfoUrYw9xV1g== 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/19] scsi: qedi: Use kthread_create_on_cpu() Date: Wed, 11 Dec 2024 16:40:18 +0100 Message-ID: <20241211154035.75565-6-frederic@kernel.org> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20241211154035.75565-1-frederic@kernel.org> References: <20241211154035.75565-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 628d59dda20c..f2bb49019617 100644 --- a/drivers/scsi/qedi/qedi_main.c +++ b/drivers/scsi/qedi/qedi_main.c @@ -1961,13 +1961,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;