Received: by 2002:a05:6a10:eb17:0:0:0:0 with SMTP id hx23csp574997pxb; Fri, 3 Sep 2021 08:29:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwbDxmjqQRjMgufmMWnKhKGRgs7e4Uoebb+/xVP2LVDYzPjo86fOtXUCbGqZM5J77DNDqCP X-Received: by 2002:a17:906:5855:: with SMTP id h21mr4753822ejs.230.1630682953283; Fri, 03 Sep 2021 08:29:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630682953; cv=none; d=google.com; s=arc-20160816; b=HyUC3Au3Bcgb9BhhdjxoGVB/3cv7a2rFz3cB8hINkytrU8CKWx1J29uOjqwLVsdkxd aVycv2/FQ4UJx7v31FVZUGiHN0QsU7tnuwHtXDo+z1Cc2eA7SCWd+rL9xWFXXEhadFT3 2CpPdo3/LcrVWfn38utwxqfnhK85974LHkuG+uLsHn1G31rTdJKBABl8lgiP0D2RIOfP QbnmT7SQYlmKex2Lrak0lhYVXeThD4009ttSR/8/NTieboA38ECisVdT4sBfF8uO00xh gQMZd2BZLL+7SCodHryq9pYciNEZVpPdNo+/Qbo8UWrJt0JK3+HoYKkmCqBrTWtQU6Hn dr9Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=IOzJpRkGxmKTqFp67xwOIenGyy38XfGpuDU4zTEm0Aw=; b=cXGwlEH/rPrjzPiAtGDwBUcjWt7z3HPobncx10W6BtUy0+Li1lnTdiaiEcSHkl/RA8 Y5fJUa1FbLz0/5bwX9webd01NEqPWVTbIfolfsMamAOOPJ22wT93XSFH3ZNxfbxYv5om OlG5AZBdD7ATzh9Xnu7cWIsQnxO/R0rXRsfsNUSZrrNTIACbGiqTVoRye5NRaGn1Q4KN ukoqRL5DynQ0BuVpklpkug3mTAoRnCZSl3G4isA3lXqXNk9QSjbQ2mCjNdg94CKuomJj HyAOq1jEp4oboi8vKs0o+nHMShQdCWRrtVFiydVDXGzQgu8xx38G2OyIi9lEdVw4xwiH 8a+A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=HcjAO2TC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a25si5711042ejc.304.2021.09.03.08.28.48; Fri, 03 Sep 2021 08:29:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=HcjAO2TC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1349585AbhICP1d (ORCPT + 99 others); Fri, 3 Sep 2021 11:27:33 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:57566 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1349749AbhICP1Q (ORCPT ); Fri, 3 Sep 2021 11:27:16 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1630682776; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=IOzJpRkGxmKTqFp67xwOIenGyy38XfGpuDU4zTEm0Aw=; b=HcjAO2TCvb+Yyc17geI5IjmThlpr7cUNVHgCj5BZkaiSuel/KUNkPK29yBQVKLp76s51M/ +z+63IsIhhJFtxG0NYNCUhcf7foZ4FLpAlUnlor36a9DEEVoFfe1WCMgZi0HiYB94O9yAF RStxI1ecdcpyOLmeMdoM8HDDRYKF1No= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-396-zfQr1nrbNlC8_0u-D3PU8A-1; Fri, 03 Sep 2021 11:26:15 -0400 X-MC-Unique: zfQr1nrbNlC8_0u-D3PU8A-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id A0F9918460E0; Fri, 3 Sep 2021 15:26:13 +0000 (UTC) Received: from virtlab512.virt.lab.eng.bos.redhat.com (virtlab512.virt.lab.eng.bos.redhat.com [10.19.152.206]) by smtp.corp.redhat.com (Postfix) with ESMTP id CB1C76E0B0; Fri, 3 Sep 2021 15:26:08 +0000 (UTC) From: Nitesh Narayan Lal To: linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, linux-scsi@vger.kernel.org, netdev@vger.kernel.org, davem@davemloft.net, ajit.khaparde@broadcom.com, sriharsha.basavapatna@broadcom.com, somnath.kotur@broadcom.com, huangguangbin2@huawei.com, huangdaode@huawei.com, mtosatti@redhat.com, juri.lelli@redhat.com, frederic@kernel.org, abelits@marvell.com, bhelgaas@google.com, rostedt@goodmis.org, peterz@infradead.org Cc: nilal@redhat.com, jesse.brandeburg@intel.com, robin.murphy@arm.com, mingo@kernel.org, jbrandeb@kernel.org, akpm@linuxfoundation.org, sfr@canb.auug.org.au, stephen@networkplumber.org, rppt@linux.vnet.ibm.com, chris.friesen@windriver.com, maz@kernel.org, nhorman@tuxdriver.com, pjwaskiewicz@gmail.com, sassmann@redhat.com, thenzl@redhat.com, james.smart@broadcom.com, dick.kennedy@broadcom.com, jkc@redhat.com, faisal.latif@intel.com, shiraz.saleem@intel.com, tariqt@nvidia.com, ahleihel@redhat.com, kheib@redhat.com, borisp@nvidia.com, saeedm@nvidia.com, tatyana.e.nikolova@intel.com, mustafa.ismail@intel.com, ahs3@redhat.com, leonro@nvidia.com, chandrakanth.patil@broadcom.com, bjorn.andersson@linaro.org, chunkuang.hu@kernel.org, yongqiang.niu@mediatek.com, baolin.wang7@gmail.com, poros@redhat.com, minlei@redhat.com, emilne@redhat.com, jejb@linux.ibm.com, martin.petersen@oracle.com, kabel@kernel.org, viresh.kumar@linaro.org, kuba@kernel.org, kashyap.desai@broadcom.com, sumit.saxena@broadcom.com, shivasharan.srikanteshwara@broadcom.com, sathya.prakash@broadcom.com, sreekanth.reddy@broadcom.com, suganath-prabu.subramani@broadcom.com, tglx@linutronix.de, ley.foon.tan@intel.com, jbrunet@baylibre.com, johannes@sipsolutions.net, snelson@pensando.io, lewis.hanly@microchip.com, benve@cisco.com, _govind@gmx.com, jassisinghbrar@gmail.com Subject: [PATCH v6 11/14] scsi: lpfc: Use irq_set_affinity Date: Fri, 3 Sep 2021 11:24:27 -0400 Message-Id: <20210903152430.244937-12-nitesh@redhat.com> In-Reply-To: <20210903152430.244937-1-nitesh@redhat.com> References: <20210903152430.244937-1-nitesh@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The driver uses irq_set_affinity_hint to set the affinity for the lpfc interrupts to a mask corresponding to the local NUMA node to avoid performance overhead on AMD architectures. However, irq_set_affinity_hint() setting the affinity is an undocumented side effect that this function also sets the affinity under the hood. To remove this side effect irq_set_affinity_hint() has been marked as deprecated and new interfaces have been introduced. Also, as per the commit dcaa21367938 ("scsi: lpfc: Change default IRQ model on AMD architectures"): "On AMD architecture, revert the irq allocation to the normal style (non-managed) and then use irq_set_affinity_hint() to set the cpu affinity and disable user-space rebalancing." we don't really need to set the affinity_hint as user-space rebalancing for the lpfc interrupts is not desired. Hence, replace the irq_set_affinity_hint() with irq_set_affinity() which only applies the affinity for the interrupts. Signed-off-by: Nitesh Narayan Lal Reviewed-by: James Smart --- drivers/scsi/lpfc/lpfc_init.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c index 0ec322f0e3cb..5d761ad642a5 100644 --- a/drivers/scsi/lpfc/lpfc_init.c +++ b/drivers/scsi/lpfc/lpfc_init.c @@ -12617,7 +12617,7 @@ lpfc_irq_set_aff(struct lpfc_hba_eq_hdl *eqhdl, unsigned int cpu) cpumask_clear(&eqhdl->aff_mask); cpumask_set_cpu(cpu, &eqhdl->aff_mask); irq_set_status_flags(eqhdl->irq, IRQ_NO_BALANCING); - irq_set_affinity_hint(eqhdl->irq, &eqhdl->aff_mask); + irq_set_affinity(eqhdl->irq, &eqhdl->aff_mask); } /** @@ -12906,7 +12906,6 @@ lpfc_sli4_enable_msix(struct lpfc_hba *phba) for (--index; index >= 0; index--) { eqhdl = lpfc_get_eq_hdl(index); lpfc_irq_clear_aff(eqhdl); - irq_set_affinity_hint(eqhdl->irq, NULL); free_irq(eqhdl->irq, eqhdl); } @@ -13067,7 +13066,6 @@ lpfc_sli4_disable_intr(struct lpfc_hba *phba) for (index = 0; index < phba->cfg_irq_chann; index++) { eqhdl = lpfc_get_eq_hdl(index); lpfc_irq_clear_aff(eqhdl); - irq_set_affinity_hint(eqhdl->irq, NULL); free_irq(eqhdl->irq, eqhdl); } } else { -- 2.27.0