From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 85414C11F67 for ; Wed, 14 Jul 2021 12:56:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 636F9613B6 for ; Wed, 14 Jul 2021 12:56:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239326AbhGNM7r (ORCPT ); Wed, 14 Jul 2021 08:59:47 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:43176 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231480AbhGNM7r (ORCPT ); Wed, 14 Jul 2021 08:59:47 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1626267415; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=raZzmrSm7aAF93XtBd5NdebdkvP4rzoUtxpQ14Vvgi8=; b=YSGQxx/P/js+w8W0ywRLPHlB4ntHt3v9xhBFAbiPzCmvRshPwPP9Kp6+mszzPXm3FlA9kH VePyjelIMjGEf1M+KUmFYoFe3bADaOefBc/Jx4PO1cC6ofRrka/b+Xh0Nq3RrrSqDy6wEX I+hObQYmFMA3tdRvyBQbv1+gAfCFCrY= Received: from mail-lf1-f71.google.com (mail-lf1-f71.google.com [209.85.167.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-222-OU49EIXaM2--l2jp-q62YQ-1; Wed, 14 Jul 2021 08:56:54 -0400 X-MC-Unique: OU49EIXaM2--l2jp-q62YQ-1 Received: by mail-lf1-f71.google.com with SMTP id bu14-20020a056512168eb029031226594940so557781lfb.15 for ; Wed, 14 Jul 2021 05:56:54 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=raZzmrSm7aAF93XtBd5NdebdkvP4rzoUtxpQ14Vvgi8=; b=WuwizRYcCyEEETHWNpBWpZx0o2MtfytsdDyUkcDtsgossRE4jqt9v2ymVk+/OfwTOX KpFaIeIAxHHNv4+cynZ/AnFoF+O+dAsvpnZSnSu7eBQVC00pIh6VziH2D+flnDKZ2eqW j6WTsVobFBfSFKBVWcSJWBFpAgdPeef37BvspLQII/yGjE0R8ycyM7koFkTp7Z3TH5LU In6nQVcFfWKBuxa5/ap4VO7UBr3sIO7HbCII5Sg0X14eX9jxOLKj8C80g/nZoCThKU18 NFou52K8ewRXDZDvIy3cgsTy6PHZiEnMPnhiQZ+6DISQ6L1/kkcc43/FPAcGrHEQNAfI fnsw== X-Gm-Message-State: AOAM532xzeuZVv2jVTD25O4wvX+g4omx5Y4WoUc9IZJN860dq4H5eW/+ gekYb1GhgPCUpHJQKDEe0MCiKoOQjUQE8+iY2YfQPIFhqwmBsOXHW8YIAHBl5CxAdbPVQ4RNu/3 75HyqeDAH2RBiOKRjPZWGll/oO208LdNxzsNe X-Received: by 2002:a19:7d05:: with SMTP id y5mr7890016lfc.159.1626267412709; Wed, 14 Jul 2021 05:56:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx8jmr/n3HvyYiI0el6kooSvghZovJs9ESz6mJmR0hmZCuQ98JAONelY4P6o0p0ninDERR/o2eRUttWE5gB5mc= X-Received: by 2002:a19:7d05:: with SMTP id y5mr7889951lfc.159.1626267412400; Wed, 14 Jul 2021 05:56:52 -0700 (PDT) MIME-Version: 1.0 References: <20210713211502.464259-1-nitesh@redhat.com> <20210713211502.464259-7-nitesh@redhat.com> In-Reply-To: From: Nitesh Lal Date: Wed, 14 Jul 2021 08:56:41 -0400 Message-ID: Subject: Re: [PATCH v3 06/14] RDMA/irdma: Use irq_set_affinity_and_hint To: Leon Romanovsky Cc: Nitesh Narayan Lal , 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, Thomas Gleixner , Jesse Brandeburg , Robin Murphy , Marcelo Tosatti , Ingo Molnar , jbrandeb@kernel.org, frederic@kernel.org, Juri Lelli , Alex Belits , Bjorn Helgaas , 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, Marc Zyngier , Neil Horman , pjwaskiewicz@gmail.com, Stefan Assmann , Tomas Henzl , kashyap.desai@broadcom.com, Sumit Saxena , shivasharan.srikanteshwara@broadcom.com, sathya.prakash@broadcom.com, Sreekanth Reddy , suganath-prabu.subramani@broadcom.com, james.smart@broadcom.com, dick.kennedy@broadcom.com, Ken Cox , faisal.latif@intel.com, shiraz.saleem@intel.com, tariqt@nvidia.com, Alaa Hleihel , Kamal Heib , 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, "Nikolova, Tatyana E" , "Ismail, Mustafa" , Al Stone , Chandrakanth Patil Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-api@vger.kernel.org On Wed, Jul 14, 2021 at 8:03 AM Leon Romanovsky wrote: > > On Tue, Jul 13, 2021 at 05:14:54PM -0400, Nitesh Narayan Lal wrote: > > The driver uses irq_set_affinity_hint() to update the affinity_hint mask > > that is consumed by the userspace to distribute the interrupts and to apply > > the provided mask as the affinity for its interrupts. However, > > irq_set_affinity_hint() applying the provided cpumask as an affinity for > > the interrupt is an undocumented side effect. > > > > To remove this side effect irq_set_affinity_hint() has been marked > > as deprecated and new interfaces have been introduced. Hence, replace the > > irq_set_affinity_hint() with the new interface irq_set_affinity_and_hint() > > where the provided mask needs to be applied as the affinity and > > affinity_hint pointer needs to be set and replace with > > irq_update_affinity_hint() where only affinity_hint needs to be updated. > > > > Signed-off-by: Nitesh Narayan Lal > > --- > > drivers/infiniband/hw/irdma/hw.c | 4 ++-- > > 1 file changed, 2 insertions(+), 2 deletions(-) > > > > diff --git a/drivers/infiniband/hw/irdma/hw.c b/drivers/infiniband/hw/irdma/hw.c > > index 7afb8a6a0526..7f13a051d4de 100644 > > --- a/drivers/infiniband/hw/irdma/hw.c > > +++ b/drivers/infiniband/hw/irdma/hw.c > > @@ -537,7 +537,7 @@ static void irdma_destroy_irq(struct irdma_pci_f *rf, > > struct irdma_sc_dev *dev = &rf->sc_dev; > > > > dev->irq_ops->irdma_dis_irq(dev, msix_vec->idx); > > - irq_set_affinity_hint(msix_vec->irq, NULL); > > + irq_update_affinity_hint(msix_vec->irq, NULL); > > free_irq(msix_vec->irq, dev_id); > > } > > > > @@ -1087,7 +1087,7 @@ irdma_cfg_ceq_vector(struct irdma_pci_f *rf, struct irdma_ceq *iwceq, > > } > > cpumask_clear(&msix_vec->mask); > > cpumask_set_cpu(msix_vec->cpu_affinity, &msix_vec->mask); > > - irq_set_affinity_hint(msix_vec->irq, &msix_vec->mask); > > + irq_set_affinity_and_hint(msix_vec->irq, &msix_vec->mask); > > I think that it needs to be irq_update_affinity_hint(). > Ah! I got a little confused from our last conversation about mlx5. IIUC mlx5 sub-function use case uses irdma (?) and that's why I thought that perhaps we would also want to define the affinity here from the beginning. In any case, I will make the change and re-post. -- Thanks Nitesh