Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp894311pxj; Thu, 17 Jun 2021 16:47:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwQeHFf44z+DrAqhkdDRe6knTM9UPFfakMVcxOJVfqG+J5b98y3+dfrMtyHiISUBNxdARt0 X-Received: by 2002:a17:906:d1d1:: with SMTP id bs17mr7994307ejb.492.1623973630327; Thu, 17 Jun 2021 16:47:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623973630; cv=none; d=google.com; s=arc-20160816; b=wJc2635Q1BbKuVmnB8+ORMVG785IlwKeQ/Uw/tBK72l0NpJVL02WljddqzZHlM0Dn9 902/Q+TQFoQgSEK4K+1jnp6lB4NrUnPHWBOiP9jLR1Zi3nsqcwpCRVapMGhGIbuKgTE1 t9x02+R6TjFD2sbWpDRdwq7HZogL+tkkScdNM6VmzuUec6WlyEExIpQHeTYRV7/Tw8s7 O/o4L1Bzg9sLZ7KueCDFByEK4iyeirTBN25g+Br1oVMdVjehBVMUfLKWoDMf3YAFkdNv 2XfH7l0XFptXKYMuyA5FQsmTBShEcKE+bYu+uzqWJg2N1AeO4NiJe7n1rdhID3PtoILP H2NQ== 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=OKZ79TMn7nNOmPGpyBhp062PBF7LikzSjmo8J8Xk8IM=; b=itSoOjHQuDAJ8FDGyqgvM8lszXG3KMzBarQ+8fBs5BGK6e5sQA8pg2gPyN/FHptJhC IRMAvV8QhVmGwDlCHGK/JVyRgV9jpVyh6ZwfhTCMGkTIUPLqPsOJYAm3RLPc1tp7hWWd Lf6uFbv2tyuz8ZlLqCGnlx3XfxcgXYBmePviOcilE/dPod2T4o86QULaDDink2ktx0P7 TWjN+cAAUhyNgBm8KTgNxs7pdmSU8iDtrX8ui/hbbvH5pZp/jEq51vJ1PhDsOSX7L71Q iIXaLz95iuzfkftT6uJccQANwl+RNY8M/zArOqbrbljjJWdTtMGOh9cBQRrMjUQzRHUk dP+w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=MFPzjs+6; 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 hz10si516252ejc.726.2021.06.17.16.46.47; Thu, 17 Jun 2021 16:47:10 -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=MFPzjs+6; 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 S233758AbhFQS1X (ORCPT + 99 others); Thu, 17 Jun 2021 14:27:23 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:43939 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233650AbhFQS0j (ORCPT ); Thu, 17 Jun 2021 14:26:39 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1623954269; 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=OKZ79TMn7nNOmPGpyBhp062PBF7LikzSjmo8J8Xk8IM=; b=MFPzjs+6p9ZsLuG62ecrgUhYtHa9Woybn3vAPJc4v6p4yTnqM6PDfMwXymD/WFG4oa7ke4 mm9OR6P4+UlK7uJPG6k6I3M/rhKIyXipxlKL9iBZhn01+W+tVMO47kGmHTvugdWKUdQYVI Tvz2xME87EZAKCU7S8PPf7l0S/pqWao= 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-238-QhaejByGPRuUjc9v-Ng6cQ-1; Thu, 17 Jun 2021 14:24:28 -0400 X-MC-Unique: QhaejByGPRuUjc9v-Ng6cQ-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 84E12107ACF6; Thu, 17 Jun 2021 18:24:23 +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 226EB60C05; Thu, 17 Jun 2021 18:24:20 +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, luobin9@huawei.com, ajit.khaparde@broadcom.com, sriharsha.basavapatna@broadcom.com, somnath.kotur@broadcom.com, nilal@redhat.com Subject: [PATCH v1 11/14] scsi: lpfc: Use irq_set_affinity Date: Thu, 17 Jun 2021 14:22:39 -0400 Message-Id: <20210617182242.8637-12-nitesh@redhat.com> In-Reply-To: <20210617182242.8637-1-nitesh@redhat.com> References: <20210617182242.8637-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 5f018d02bf56..d6e48414018d 100644 --- a/drivers/scsi/lpfc/lpfc_init.c +++ b/drivers/scsi/lpfc/lpfc_init.c @@ -11360,7 +11360,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); } /** @@ -11649,7 +11649,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); } @@ -11810,7 +11809,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