Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp490949pxu; Wed, 25 Nov 2020 08:10:29 -0800 (PST) X-Google-Smtp-Source: ABdhPJwOKagT0r+M4GNADck8nrxIWqVYVcPmgN/son9z1y+oUAOWPeKkXTygWirKQZ9dR+eVNM6M X-Received: by 2002:a05:6402:1d85:: with SMTP id dk5mr4025280edb.283.1606320629307; Wed, 25 Nov 2020 08:10:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606320629; cv=none; d=google.com; s=arc-20160816; b=mhFD0yUOI9ykowVg2Pr1sZ6F5z1Qo4nJfAUcqaYuURL/jZdmKB/BzzI3IOmEbc/rDz 1h6cczHboqja65o1mJj9Kh6RcaVzsvQdiV8nd4xT//ooTI/JzEAjnrty1C0o2Od51WjD hZO/4lHm9i2FCsbvAA/+pKfs2IhGLirH3DmviqqMyNy/+XDf4FWM3glr+NJtwgm0+Cxt ynhbG1ZvGv2yPhVJ/sijWewhOpZ6FggbmEuRmdlUsNTYmCBPcuRjFO3ti67iFL92ycTF t+R/GxfaRoUaFGynCaTHe5iPOFwlXvEvXwSTRVqi+U8/eA7V/bblqblnAODZ5zcZVGZL VzxQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:references :in-reply-to:mime-version:dkim-signature; bh=sFDVHTtkdm3pyH75COND6ic4pQck9okc86/RtBFvaVI=; b=AgqhUR1IkBvpROPMItfuRyrXApbS9cdKDkIN3HmC+8i767uNWmQUPtEHHFsXN7gXe8 x9Ckxfu/KxQq9QHYY0wvVhM8d14PASu+mctQsEq2nnDafOTM6OYw6TXDhvByMw3Re1Nx 4vpPZ4ZDgnXrVjmqfDIslTl4pbYC5p1ANLxy+tnaleguap8vsOPTsVhVL3PpX+zUmze2 zwJG3ppjimaHTzpUi1JT4wJO06uMyR7LGlc/k/woZ9BkIYY5sqSp3ob+orVfYH/otXNy wWWvb5AD9+UF2XNko4NHtD/sEeKoNIMlATwWR6UF75rEVlitXb24WDwiuG8vLDzfrrna P4xA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-powerpc-org.20150623.gappssmtp.com header.s=20150623 header.b=hMOkWMlq; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a16si1419178ejd.678.2020.11.25.08.10.03; Wed, 25 Nov 2020 08:10:29 -0800 (PST) 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=@linux-powerpc-org.20150623.gappssmtp.com header.s=20150623 header.b=hMOkWMlq; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730494AbgKYQGL (ORCPT + 99 others); Wed, 25 Nov 2020 11:06:11 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54998 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730449AbgKYQGL (ORCPT ); Wed, 25 Nov 2020 11:06:11 -0500 Received: from mail-ed1-x543.google.com (mail-ed1-x543.google.com [IPv6:2a00:1450:4864:20::543]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C07A5C0613D4 for ; Wed, 25 Nov 2020 08:05:58 -0800 (PST) Received: by mail-ed1-x543.google.com with SMTP id k4so3129311edl.0 for ; Wed, 25 Nov 2020 08:05:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-powerpc-org.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=sFDVHTtkdm3pyH75COND6ic4pQck9okc86/RtBFvaVI=; b=hMOkWMlqnjT5T3KheRXSvbIdWc0NiEKFzBE+kepT432F8AjcasejaLcbsYL3gRcK6J ktpTpW0CXLElE2ZL7r4kx+Sf/JXLCyemIYnO5j9/Gtw70XK0s4XXnBiaQW1OpYZgcm0q dGisF1IsRKDGTQLvcv56O+lvXfQSSNi1VCt5gnxq2iutLJThlpEoZzYNE2JMcFjo9gJ1 qon852mKOuNW3HCJUF3xnnG6FWaC8o5Tn4RA6g/rPsz7N8e/gK1ml4P2l5sPsFQaq5Rt a9Tkd8knovVbgYgj9lrrk9Cc7sHyCadeUeHiOh3wMvr2n8O1sX2mb1g3YhHY5xXTyHGc RdQw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=sFDVHTtkdm3pyH75COND6ic4pQck9okc86/RtBFvaVI=; b=MxrFdRgXGG+0KhskHUuWI7XrtJ9N129LxtSbbP7bwMAsCUskQmTAD1ZtLl1DEKAyWI MQmTbNM1J6N9bYU5TRF7loVfPcPfU2WJifW1fCEEXIL6Ne/gMzDEYu2iuW2Na/6UHX2V Zj4DTdttnfzW++9uUp/uUrU3CbWwc4rHXqLb/smhQdWLsmKTFcGKBlF+4dim7NDFprbk rthe65lCLe5+5bB2jQiUj5odPo2RA43Gx1e0vVveKLtPvHnLzj01FDzSKncXFkqMCdKM P0CA60uuUaonS/gmZ9SzIph2A81YZSwPCSnP3EVB+p6uPrQV++vJp1GQ6sXTBiibCzou x+Xw== X-Gm-Message-State: AOAM531HMjS+jq1TWYuBEQmH+CQHQEffRsIPw+W2u81VBRhXKnnfqXi1 pt73aOs6E0p81nh2vt6ZxsD/62gfdeSuk5zZLSOhJA== X-Received: by 2002:a05:6402:22e3:: with SMTP id dn3mr4377399edb.136.1606320357550; Wed, 25 Nov 2020 08:05:57 -0800 (PST) MIME-Version: 1.0 Received: by 2002:a54:3cc7:0:0:0:0:0 with HTTP; Wed, 25 Nov 2020 08:05:56 -0800 (PST) X-Originating-IP: [5.35.99.104] In-Reply-To: <20201125150932.1150619-3-lvivier@redhat.com> References: <20201125150932.1150619-1-lvivier@redhat.com> <20201125150932.1150619-3-lvivier@redhat.com> From: Denis Kirjanov Date: Wed, 25 Nov 2020 19:05:56 +0300 Message-ID: Subject: Re: [PATCH v3 2/2] powerpc/pseries: pass MSI affinity to irq_create_mapping() To: Laurent Vivier Cc: linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, Christoph Hellwig , Paul Mackerras , Greg Kurz , linuxppc-dev@lists.ozlabs.org, Thomas Gleixner , Benjamin Herrenschmidt , Michael Ellerman , linux-block@vger.kernel.org, "Michael S . Tsirkin" , Marc Zyngier Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11/25/20, Laurent Vivier wrote: > With virtio multiqueue, normally each queue IRQ is mapped to a CPU. > > But since commit 0d9f0a52c8b9f ("virtio_scsi: use virtio IRQ affinity") > this is broken on pseries. Please add "Fixes" tag. Thanks! > > The affinity is correctly computed in msi_desc but this is not applied > to the system IRQs. > > It appears the affinity is correctly passed to rtas_setup_msi_irqs() but > lost at this point and never passed to irq_domain_alloc_descs() > (see commit 06ee6d571f0e ("genirq: Add affinity hint to irq allocation")) > because irq_create_mapping() doesn't take an affinity parameter. > > As the previous patch has added the affinity parameter to > irq_create_mapping() we can forward the affinity from rtas_setup_msi_irqs() > to irq_domain_alloc_descs(). > > With this change, the virtqueues are correctly dispatched between the CPUs > on pseries. > > BugId: https://bugzilla.redhat.com/show_bug.cgi?id=1702939 > Signed-off-by: Laurent Vivier > Reviewed-by: Greg Kurz > --- > arch/powerpc/platforms/pseries/msi.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/arch/powerpc/platforms/pseries/msi.c > b/arch/powerpc/platforms/pseries/msi.c > index 133f6adcb39c..b3ac2455faad 100644 > --- a/arch/powerpc/platforms/pseries/msi.c > +++ b/arch/powerpc/platforms/pseries/msi.c > @@ -458,7 +458,8 @@ static int rtas_setup_msi_irqs(struct pci_dev *pdev, int > nvec_in, int type) > return hwirq; > } > > - virq = irq_create_mapping(NULL, hwirq); > + virq = irq_create_mapping_affinity(NULL, hwirq, > + entry->affinity); > > if (!virq) { > pr_debug("rtas_msi: Failed mapping hwirq %d\n", hwirq); > -- > 2.28.0 > >