From patchwork Mon Sep 16 22:49:08 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frederic Weisbecker X-Patchwork-Id: 829202 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 31A4816A949; Mon, 16 Sep 2024 22:49:44 +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=1726526985; cv=none; b=k/cTj8cLcjoAYrr6+GohIP7HrBjM0a9AaeTEfDT5b0l1XOfWd1UWlW8lOWVNNG3titPW/7Q4cYwTCcqIZrwhQ3hwPB3vvx+nmfFpqSoIJhSrjDasgPXLMX90RFuq+GEytAIMTnJIzTSI95NYpXDqI26jRUrlWtV5qdv5mjr0SuQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1726526985; c=relaxed/simple; bh=cdyOFZ56rRxPsoxfyH8Hg6jYWPKMlf0Eg+/EbRKiEBw=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=NszvkMcyC6mGpe+jCSOolX/r1tgL0yxXeYNmXadXL78HfMSciJM4jafM2G+lbr484VZv4KD3wKJJno9jO99s4L7pC1pc1iJ44Vp+19CasJ9m+ovc/PeeA9EeSTWJaXT5Iop4UblE0DNXqYKgTPJjhvrkecNWuzupzLhh4PwMLvg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=jhbkAqjU; 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="jhbkAqjU" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0FE7FC4CECD; Mon, 16 Sep 2024 22:49:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1726526984; bh=cdyOFZ56rRxPsoxfyH8Hg6jYWPKMlf0Eg+/EbRKiEBw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jhbkAqjUCBfYUyFOBkoUh/V1dg7EhwkBohNbuqnZxRC04cARGGh+oA+I97cuaxJBd pUt/n3YlqvIQouasX0w1k8sPdVAp8uNwAnFzR+apwXU0Jv5GTmsn8rfq7Hl6PU8nQk cjUaPEm5AOTJpojnHFmdi04cyw/K6z8YsOutDxVVAmO9erNlQO2SfZLY2d1LMAa0bk OpAiE70Mj0njik3Oqc3LKSU9dH3Ig/uovJNaJeP9+l92PJycuyQv0EG9NqOxiDFZOs EKyFHoaOVu3nOuIcfGdiBw3586YG3Oa5iHrm4aKYXRgaql9+5aFlyCVw2SvNDmxdwG O0/VSFL3hxXTQ== 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/19] scsi: bnx2fc: Use kthread_create_on_cpu() Date: Tue, 17 Sep 2024 00:49:08 +0200 Message-ID: <20240916224925.20540-5-frederic@kernel.org> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240916224925.20540-1-frederic@kernel.org> References: <20240916224925.20540-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 Mon Sep 16 22:49:09 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frederic Weisbecker X-Patchwork-Id: 829799 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 E919F171E76; Mon, 16 Sep 2024 22:49: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=1726526988; cv=none; b=gx6NXzChn3KlpmHuFHY+vtjn28hie4SKEBStwH2b05q5WhGn4ajzleZMTISCjiKSC+TWjUVnB4+QdGi+sM0udSrfQNw7FxyaJp7DnRdZanuMVZe5mB1GwNG9JeR3qpw7YAvCjrT/H6EVKI7/4GGj2oJ+BcEQrtAvpu1dC2LjvX0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1726526988; c=relaxed/simple; bh=LFXpL5/nrAXstPiOj0IbxTit69TGzKOpoS47R1I/bUE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=tY5Qw/QFRR0ywHChQQvbEdTA83XXXPafjCNJwCk7VfO0G1gPZrDtLd1c2yQfEfjfydsuF5ZnuVaK9mGMs854ZNf3tqDJIFWPNsHTNkPPDINFg46JB8x/f2m5ZD5ermiGk/4yKIMqhm3SMdVEUG7aw/U6UJ0HOKo0aAIdUwMBwrQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=uRQdGMs9; 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="uRQdGMs9" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 37984C4CEC5; Mon, 16 Sep 2024 22:49:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1726526987; bh=LFXpL5/nrAXstPiOj0IbxTit69TGzKOpoS47R1I/bUE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=uRQdGMs9El42oHS8FlP1L+Cffh1xjv7mPFiZD1wzTaJP4YYNUWyWan2aBB203A0CU 8mvvOCVFHgJ1c6E7swTlTbR9QEIg+oSvO6rKMqsPtiNKgJPEaC7IsLEWvjE4H6YoRe pILtCpvgvt6snr9/Eg4V8QvfoAnp0BZbuXfu7SmTRQgyM9nTHz/MrfzcfnIS0IFM2w 57XrqndQn8CJCw1RXzOZ459Avbfce6iivA3fzJF4EYqDRvB8CQw89RUl38BIkPrnDC rMikcDonK2+BEhcSWIOu/QW29rlgwnJVLPYM9VzDVHtJE2AIoi1ycWgVpmiaRvB08O DwZVRAsmYTtoQ== 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: bnx2i: Use kthread_create_on_cpu() Date: Tue, 17 Sep 2024 00:49:09 +0200 Message-ID: <20240916224925.20540-6-frederic@kernel.org> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240916224925.20540-1-frederic@kernel.org> References: <20240916224925.20540-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 Mon Sep 16 22:49:10 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frederic Weisbecker X-Patchwork-Id: 829201 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 C95C017BEB4; Mon, 16 Sep 2024 22:49: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=1726526990; cv=none; b=BodaQG3Z/Niwh69uOQyog/EMAPtKVW+gY9UMkdM/xhGeuKVYrlGicenTRz+WTiKm0BU/P3dDDM1tLV63LEe5wOP3dgHokPyUfuoLdsXUdTp3DEutPxr/t2n2rgxuKoV2jFEdpy9w15nEE5vYMd7Ixj1hapRagp5rBj37oCn2SJg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1726526990; c=relaxed/simple; bh=0D4ZBeW2hHDtitqEqj91MoEj//vAjJvVBf06g/Chc4c=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=X0BvzCQ05UKM86fYuDhKvpf6iifDUZrGEpar0mKO94s7PYlF7OfsYFMNAA3tICC86w6Y75V8TwB677ANQsqXwlFbST8ArrHcGdthRk76YR0rKGxPFOn+5Qmsp3MUONfeXwECQyNbSYgI8EEOkj9/xDqxDZvUYRO7EW8+FC+RqZs= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=aVngEs9m; 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="aVngEs9m" Received: by smtp.kernel.org (Postfix) with ESMTPSA id E9E92C4CECF; Mon, 16 Sep 2024 22:49:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1726526990; bh=0D4ZBeW2hHDtitqEqj91MoEj//vAjJvVBf06g/Chc4c=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=aVngEs9mjRSKnKxtAVgyhhxICPhb5CAkw2hWHpwKNmdU8bVj8bK9Jcu20lJ+MItuG VuxTcl4p3wiFpCijxYql2y4+zq+QFXieYxVYUHDhxsrknoLekqQN7Pf4PYO8+7enQP dcAXEECTj01n6fzSGWm0bRWbzBUQ2SwDYrTdMdWjDTuHytyD6Rl30KO6RCzcFns2lf eFtrgfI3Q5G6jBps5ObVKYA1gZyRLFoelq+mv5akYi6NoK5RaPd6I7bzktqocIQCh4 jESMZu9xwAcz1eZLnFJLT7EV8z/uW2I6h7Dta5MY+u5JjAuDNK02ENPhSum/m/t9bD vOR4J0iF/LVJg== 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/19] scsi: qedi: Use kthread_create_on_cpu() Date: Tue, 17 Sep 2024 00:49:10 +0200 Message-ID: <20240916224925.20540-7-frederic@kernel.org> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240916224925.20540-1-frederic@kernel.org> References: <20240916224925.20540-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;