From patchwork Wed Aug 7 16:02: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: 817626 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 D8A6E13BC35; Wed, 7 Aug 2024 16:02:49 +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=1723046569; cv=none; b=TwWhGvtyyjkjIdaWmD9pU9q2zoT0AO9Sp3XhCQe7yUQvz+6tmy9CN0CNf38v/7xyJsbrMLlmRquBnnqoKlnwEdFXTYfNfInHnQCeLFXVUyL8Mdp/XHG99TUijf0DOs/srP0H3+t+E4ax7PFPkFvvm/HXuf1JBBCqTfGlsa/FdP0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723046569; c=relaxed/simple; bh=yDztet0jee00Ipe/s5EJY6qHQwJ1DkD7Qxns7aI/l+o=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=CIJ8aTSxcE8ZPQi79Qc76yFgjjmXdSse42TchBZyCBiYHHeYabXOChGLSXlBL44digjChO4CKwp1iJ4euxXsumZ7uPBCooS+XPDtkmYq6UYnCVJlI2BVWNNmLh/WLVbQP9auZ/PY9Um7+gyadFWCGsWbYE/x8NRZprBiq99HgdU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Cd6iFxOG; 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="Cd6iFxOG" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 36F43C4AF0B; Wed, 7 Aug 2024 16:02:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1723046569; bh=yDztet0jee00Ipe/s5EJY6qHQwJ1DkD7Qxns7aI/l+o=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Cd6iFxOGe0WX19SM/pZgOZqNZpQv32dDPiTYVXKQd8xy4xKCx7Pqv3OPg5sFPiCkR 8E59h9DHm7eAsGkKDy/+pOjinzlxp/Z53mFX6wsIpPpbLzzcLhQFbU725gcUuPbh9x uPCWzZ1vVXA0bIHrQBnqIVwvasXWF7evCKUy+DRTIKN1IAtD/PZ0RTKdx9jUp0Z4JB Q+ICJVGWoYJ47azH4uvK/ypRNRDzbpUjyRdGPh0xXOvxnuZc00w/THBVgtzbVtw2Q/ NqkoC6xvF2XRpspSQnIMcwg5T1iHg/4yu6tjUSYZ0x7OGgp22AJWoaMMDcPvmXaKUg TMx33YT6KTkTA== 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: Wed, 7 Aug 2024 18:02:10 +0200 Message-ID: <20240807160228.26206-5-frederic@kernel.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240807160228.26206-1-frederic@kernel.org> References: <20240807160228.26206-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 Wed Aug 7 16:02:11 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frederic Weisbecker X-Patchwork-Id: 817974 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 B22F613C676; Wed, 7 Aug 2024 16:02:52 +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=1723046572; cv=none; b=ccRE1fJPspREt9imgfuUmxMxoGH2QDwoYT9aXCSx1yr9e8W0lRrr6xpD6nvA2YpqctjdUkJh4Jv2tbZMdW6IiE0lAbwXhy0muver8M/KtBWqnBjf4o5lsfwaWSQ6ab9+uednMHURJYq5pdYSKWp8VMhdXrPtRtSzeihfUKDIKv8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723046572; c=relaxed/simple; bh=OdAmLrtcC1w3Cxa06wD8vbSjhHVtYldnsGlOoNisnoA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=bXAaSP6VazcbJIH8M7S7lt6Ib3fMSYu6jPppUlFU2xFQ/IJa2p1hJ/DV0TUsCdTpAHwmjKcSLuY3NnThYy6DZuYKoM0wyIpMetPOMmCZ9ZqP37quYhmDwXBealHEbNF7WkKozwxH2IkWs54/vcBWiWupnkEGMfgV5YV+3HV0CVw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=aJ+jiNUC; 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="aJ+jiNUC" Received: by smtp.kernel.org (Postfix) with ESMTPSA id DC642C32781; Wed, 7 Aug 2024 16:02:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1723046572; bh=OdAmLrtcC1w3Cxa06wD8vbSjhHVtYldnsGlOoNisnoA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=aJ+jiNUCcUDnRj337EnA6PFQWjDBYzEKkTT0MHs2V70C36BMobSPnIf7GLhnYV+gb EUODPxPS7gq/WDtTo5ZoQUwu+iiwafSVidoi+ntDIicrYm+IBUJvzJd5I8LYf1deiy JTNIwv58tFh44bUYnaDTbHYzLA4nktBfYly/1r2rsFhueikIR49tlhWPEEelD7vwzu IprpKJ5dlPqA8urLXz29VnhD/QXkBZ//Pjk2vFubJIhfNlwz4gVuBoI4gJhgtvn81L GdbV6Ov5Z6VopsAmTilkKQUKdRbqkcXMR87yPER4PFsArPydw1olh2bZsO9nPjjuon GZMMM2kRy9itQ== 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: Wed, 7 Aug 2024 18:02:11 +0200 Message-ID: <20240807160228.26206-6-frederic@kernel.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240807160228.26206-1-frederic@kernel.org> References: <20240807160228.26206-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 Aug 7 16:02:12 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frederic Weisbecker X-Patchwork-Id: 817625 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 7AA2313D52E; Wed, 7 Aug 2024 16:02:55 +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=1723046575; cv=none; b=c3T8uCLBH/2Sr2TY5eRNPqjgQH7Nmv79qQUDxsYG3ia6Gd5aSIrqNfTmLx2aWDgyAnmxzUR1k2Va3rHm1KlCgLImsy4VmnRMjlo8c7BSASCvBPxcx7Z5BLUHBtwuHDw+Yh+d37ZQRwPVEYB+RICzqgNEi+MvRIaIQhgoxSZoA0Y= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723046575; c=relaxed/simple; bh=/RulNbNlovlYsV+8HlxUGhpAD5m4gMOyHvdHkAFhJrE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Dhe5b3bt+ZeAie29X7hh/F1JinosGwoQ+JjprNlA3Ja69TDDgZJB79XLFf69tjymc1LLQQeVbqaYeyjUBDyPSTZijPT5Hm2RyOxKI9k4W51wXth0ol5n34HBOtOv9CRb12fLmN1Cjjrf32hp43eb41DmomU0LX7Ho/9gwIDiTas= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=udOSGmpV; 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="udOSGmpV" Received: by smtp.kernel.org (Postfix) with ESMTPSA id B17D2C4AF11; Wed, 7 Aug 2024 16:02:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1723046575; bh=/RulNbNlovlYsV+8HlxUGhpAD5m4gMOyHvdHkAFhJrE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=udOSGmpVFsGUjjlO1rHBFJmZQbB2Ns5BC3uFeXamGZnpfREWIKDVOaAXggbxXLjtq 4HfmD13zh34K2Y5i58PlSWh0j0TWdB5bQSNpyEDw9CllSoanSym2g4vXmLDt6IOgna 1knt5aA87TiUuuSUs3xTB6Zk8JTJIetrdHQzMRcnFKfOdAy3c6hB1YWC4prP7yFLZ1 EigI88WKqUdj4TL4Wwff0e0jWqWifYKnC0MdR8ZV0CLcLRN+D1vp3WZeXLvE2jwWDi 35c5AYWqqdIsgVE2l1oqtKWsMUxQZpdLuTueyCn49tCF90GRKC2WTbleBmLUSwm1eR safmGXwUiFfqw== 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: Wed, 7 Aug 2024 18:02:12 +0200 Message-ID: <20240807160228.26206-7-frederic@kernel.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240807160228.26206-1-frederic@kernel.org> References: <20240807160228.26206-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;