Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp3900326pxv; Mon, 19 Jul 2021 11:29:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzNCapJoA/sEATtnrjKq6rwInuJCVB4a4dzzb9dx1Cz7l6axmB/oZrablnkXGjoG3FXaa3J X-Received: by 2002:a02:b199:: with SMTP id t25mr22689633jah.35.1626719375151; Mon, 19 Jul 2021 11:29:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626719375; cv=none; d=google.com; s=arc-20160816; b=zxYwQorJOG6bRh/I0Wcyr9kIhHYrBMpLqsPcKiIH5Zv4nWHLKih9huv0j0qHGUiy0w C/32C9ArmVn60K7tgRpNtBsEUvXeKl1EEl6pQXnW6rWu5jf06unEpY6R/Ne3MCPQx0Mv 2QM5jkm81Sdg7RtY/fL/o0H+djM3dCPsO4t7AQHS6HjGc5NUAar3K7q43ljdTVEbFHb9 UxDQw7J1rxOJ8Dh68oR58ykZIPdbrjEDsPHQQG88pSXBAzty+8d0xCTBN0pWYqSBTfxz vPgKgwumchlG7JspglRsGPenMqoVc5d1bHbZBnrOd/sUpR98E3g17HRCwaDNkiz9H/uM UTpQ== 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:to:from :dkim-signature; bh=mzNBCx76Oue97s85xgfDBxjBA71n2ChlEIMSiGVXCV8=; b=0/bLA7U9OMTf5tIsPpk19GJ0t8J5DAFm3w02KLQMys3ia8PTYBorD0kOB6YRktrPtq 6SRHoqU/a0TSNSILNEOYUIA7ZtC+LKAWGh90tY2XmJI12/+c9z3YKfxTFfZIX7A9HfdN ATz1whrDweX98Vha+QrIjyymtk/HUhAypGb/5Iur/65u7bEQAIGqkXraNWmbvo2BVHh0 7NZc9SAXSNDGmRmUJLGfPQKDuCgRgN1dH6POqhWj6jHidYaPA2GGXcBKS4GC6A+AzHqc 9v9n6gTYkvE7dCRca4f/YXyOO4cJTH3K6yL0GTsiB9yhTH8MDwD3KZSxxm3Dlyh0XnfK sgLg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="fpvzjg/z"; 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 a9si20599215ilr.103.2021.07.19.11.29.22; Mon, 19 Jul 2021 11:29:35 -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="fpvzjg/z"; 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 S1348043AbhGSRrg (ORCPT + 99 others); Mon, 19 Jul 2021 13:47:36 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:36752 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1380597AbhGSR3j (ORCPT ); Mon, 19 Jul 2021 13:29:39 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1626718218; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=mzNBCx76Oue97s85xgfDBxjBA71n2ChlEIMSiGVXCV8=; b=fpvzjg/z/j37sQ2a7xu8c17Dikm6c2PUZ75AAZmQzMAYmVEPtsuBYIRXTEvSEWGDdkA7YS 435PwmXU04oLk5bJmgkeiZkh2cE97Zf2K63U+0c2H/78YgPS6iyNfXFuRGEBvYM55unJP8 l5T8b/dWmRLQiQpRVIglGcngR6840t8= 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-600-qtnFXu2XMIqLBdsMAd6D5A-1; Mon, 19 Jul 2021 14:09:51 -0400 X-MC-Unique: qtnFXu2XMIqLBdsMAd6D5A-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 756CC50750; Mon, 19 Jul 2021 18:09:49 +0000 (UTC) Received: from virtlab719.virt.lab.eng.bos.redhat.com (virtlab719.virt.lab.eng.bos.redhat.com [10.19.153.15]) by smtp.corp.redhat.com (Postfix) with ESMTP id A7618610D0; Mon, 19 Jul 2021 18:09:44 +0000 (UTC) From: Nitesh Narayan Lal To: linux-kernel@vger.kernel.org, linux-scsi@vger.kernel.org, intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org, linux-api@vger.kernel.org, linux-pci@vger.kernel.org, tglx@linutronix.de, jesse.brandeburg@intel.com, robin.murphy@arm.com, mtosatti@redhat.com, mingo@kernel.org, jbrandeb@kernel.org, frederic@kernel.org, juri.lelli@redhat.com, abelits@marvell.com, bhelgaas@google.com, rostedt@goodmis.org, peterz@infradead.org, davem@davemloft.net, akpm@linux-foundation.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, 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, 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, benve@cisco.com, govind@gmx.com, jassisinghbrar@gmail.com, ajit.khaparde@broadcom.com, sriharsha.basavapatna@broadcom.com, somnath.kotur@broadcom.com, nilal@redhat.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, _govind@gmx.com, ley.foon.tan@intel.com, kabel@kernel.org, viresh.kumar@linaro.org, Tushar.Khandelwal@arm.com, luobin9@huawei.com Subject: [PATCH v4 11/14] scsi: lpfc: Use irq_set_affinity Date: Mon, 19 Jul 2021 14:07:43 -0400 Message-Id: <20210719180746.1008665-12-nitesh@redhat.com> In-Reply-To: <20210719180746.1008665-1-nitesh@redhat.com> References: <20210719180746.1008665-1-nitesh@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 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 --- 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 5983e05b648f..8a16bacb8c93 100644 --- a/drivers/scsi/lpfc/lpfc_init.c +++ b/drivers/scsi/lpfc/lpfc_init.c @@ -11455,7 +11455,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); } /** @@ -11744,7 +11744,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); } @@ -11905,7 +11904,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