Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp415842pxu; Fri, 11 Dec 2020 05:34:00 -0800 (PST) X-Google-Smtp-Source: ABdhPJy8/y62MqSDwPbjKQhb7SI05D3rdR7Gmbjl5EKAn+/H+CnMEDG43P59iyhZrogg4ChLQ62o X-Received: by 2002:a17:906:7c49:: with SMTP id g9mr11143751ejp.185.1607693637812; Fri, 11 Dec 2020 05:33:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607693637; cv=none; d=google.com; s=arc-20160816; b=WdiW+RwooHWajWcRVgpZGSABCyUCfDe4X8OMsrJrMWMQE3CNXkXqr1FyqCgDd01Acq dloKEjB4n9zN8xWHRNmvlg3S4ntSQdrQuCt086D9gFAGPKjI/LfgX9Wy/QnAkAdQKfJE KC8Kfw/7rb/uTj6v/vM6QeFsAIOM4NT89CMAXzbhIfJGowwQByiidX0noqn3rrdmDPQc EicJOq83aATwwU2DAc6M/jlxKZa97zktkaGRvjACIuavx7fueFZtxDHn8TE/ZN+qGSYo l6DgfCNkT/IcOAfGHU3phuyv0WeBCOOdPSlyWm3zRJsWgHQ1zU+dc/AcqaYc0fn5yJxB 53kg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=Ylj5Ou5EGxXoY8HzgwHM13TBu2785E6dSVq65gzanwU=; b=UbpUjqwNYF2DY00Mr+s1H2AVQYEMU6x4RLEOp5xJrxbOKI9boM9Brlx2eWRp1WzNZT iKUMtaETs1G1whHB/PhsruTog1Af8MYhW+YNq65nVM74PJfTkEM4oHR5o3pB9epXTHo1 3wXLYDSal9EdNxw6B+X19mqns04GQ9iSGi3QuJSyW9jdclLOnTPoOPQ4nQU2hE21Pjr6 TrYenjqfApr6zhjh23a2XfMHbtZa7hQYRSKl1qb0aq8Mh6Zk03c5RoA9HlAJeVOyWIhi hRWe90KVPgyXuJT9dLfmavk4wQBk+FDPtJ/9feNdkN0GLt77a3GjP3b7ZJxaRbeh0slQ 1FtA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=JX3YEGDa; 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=QUARANTINE sp=NONE dis=NONE) header.from=suse.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d19si5011222eds.173.2020.12.11.05.33.33; Fri, 11 Dec 2020 05:33:57 -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=@suse.com header.s=susede1 header.b=JX3YEGDa; 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=QUARANTINE sp=NONE dis=NONE) header.from=suse.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1733047AbgLKKYc (ORCPT + 99 others); Fri, 11 Dec 2020 05:24:32 -0500 Received: from mx2.suse.de ([195.135.220.15]:40316 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731174AbgLKKYE (ORCPT ); Fri, 11 Dec 2020 05:24:04 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1607682195; h=from:from:reply-to: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=Ylj5Ou5EGxXoY8HzgwHM13TBu2785E6dSVq65gzanwU=; b=JX3YEGDayzn/l2cWmgQW18vQXaGMPfebAVghI4mXIKoPFWr46I+1iXrHo1/89wbKgnsUQw fJfjpQHih3nDIAzyPuBktA46WbSRZFyDOHCZ4ClWbuCsmJrqvPgr1yruvflf2j4L0wRo2h gXPAph/J2UIJAu9VFo9bE4J63Z3Pprg= Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 86CDFADA2; Fri, 11 Dec 2020 10:23:15 +0000 (UTC) Subject: Re: [patch 27/30] xen/events: Only force affinity mask for percpu interrupts To: Thomas Gleixner , boris.ostrovsky@oracle.com, LKML Cc: Peter Zijlstra , Marc Zyngier , Stefano Stabellini , xen-devel@lists.xenproject.org, "James E.J. Bottomley" , Helge Deller , afzal mohammed , linux-parisc@vger.kernel.org, Russell King , linux-arm-kernel@lists.infradead.org, Mark Rutland , Catalin Marinas , Will Deacon , Christian Borntraeger , Heiko Carstens , linux-s390@vger.kernel.org, Jani Nikula , Joonas Lahtinen , Rodrigo Vivi , David Airlie , Daniel Vetter , Pankaj Bharadiya , Chris Wilson , Wambui Karuga , intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, Tvrtko Ursulin , Linus Walleij , linux-gpio@vger.kernel.org, Lee Jones , Jon Mason , Dave Jiang , Allen Hubbe , linux-ntb@googlegroups.com, Lorenzo Pieralisi , Rob Herring , Bjorn Helgaas , Michal Simek , linux-pci@vger.kernel.org, Karthikeyan Mitran , Hou Zhiqiang , Tariq Toukan , "David S. Miller" , Jakub Kicinski , netdev@vger.kernel.org, linux-rdma@vger.kernel.org, Saeed Mahameed , Leon Romanovsky References: <20201210192536.118432146@linutronix.de> <20201210194045.250321315@linutronix.de> <7f7af60f-567f-cdef-f8db-8062a44758ce@oracle.com> <874kksiras.fsf@nanos.tec.linutronix.de> From: =?UTF-8?B?SsO8cmdlbiBHcm/Dnw==?= Message-ID: <83b596c7-453b-34b5-a6a5-6c04d20e818a@suse.com> Date: Fri, 11 Dec 2020 11:23:13 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.4.0 MIME-Version: 1.0 In-Reply-To: <874kksiras.fsf@nanos.tec.linutronix.de> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="JLZob3e3TcGZaffU2V6GYg9zw25iTy30k" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --JLZob3e3TcGZaffU2V6GYg9zw25iTy30k Content-Type: multipart/mixed; boundary="W7MOwpcHMEZDHVpnNeRdRpRviypq0k3b2"; protected-headers="v1" From: =?UTF-8?B?SsO8cmdlbiBHcm/Dnw==?= To: Thomas Gleixner , boris.ostrovsky@oracle.com, LKML Cc: Peter Zijlstra , Marc Zyngier , Stefano Stabellini , xen-devel@lists.xenproject.org, "James E.J. Bottomley" , Helge Deller , afzal mohammed , linux-parisc@vger.kernel.org, Russell King , linux-arm-kernel@lists.infradead.org, Mark Rutland , Catalin Marinas , Will Deacon , Christian Borntraeger , Heiko Carstens , linux-s390@vger.kernel.org, Jani Nikula , Joonas Lahtinen , Rodrigo Vivi , David Airlie , Daniel Vetter , Pankaj Bharadiya , Chris Wilson , Wambui Karuga , intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, Tvrtko Ursulin , Linus Walleij , linux-gpio@vger.kernel.org, Lee Jones , Jon Mason , Dave Jiang , Allen Hubbe , linux-ntb@googlegroups.com, Lorenzo Pieralisi , Rob Herring , Bjorn Helgaas , Michal Simek , linux-pci@vger.kernel.org, Karthikeyan Mitran , Hou Zhiqiang , Tariq Toukan , "David S. Miller" , Jakub Kicinski , netdev@vger.kernel.org, linux-rdma@vger.kernel.org, Saeed Mahameed , Leon Romanovsky Message-ID: <83b596c7-453b-34b5-a6a5-6c04d20e818a@suse.com> Subject: Re: [patch 27/30] xen/events: Only force affinity mask for percpu interrupts References: <20201210192536.118432146@linutronix.de> <20201210194045.250321315@linutronix.de> <7f7af60f-567f-cdef-f8db-8062a44758ce@oracle.com> <874kksiras.fsf@nanos.tec.linutronix.de> In-Reply-To: <874kksiras.fsf@nanos.tec.linutronix.de> --W7MOwpcHMEZDHVpnNeRdRpRviypq0k3b2 Content-Type: multipart/mixed; boundary="------------C0A97F76D1E2DDEBCBB7C379" Content-Language: en-US This is a multi-part message in MIME format. --------------C0A97F76D1E2DDEBCBB7C379 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable On 11.12.20 11:13, Thomas Gleixner wrote: > On Fri, Dec 11 2020 at 07:17, J=C3=BCrgen Gro=C3=9F wrote: >> On 11.12.20 00:20, boris.ostrovsky@oracle.com wrote: >>> >>> On 12/10/20 2:26 PM, Thomas Gleixner wrote: >>>> All event channel setups bind the interrupt on CPU0 or the target CP= U for >>>> percpu interrupts and overwrite the affinity mask with the correspon= ding >>>> cpumask. That does not make sense. >>>> >>>> The XEN implementation of irqchip::irq_set_affinity() already picks = a >>>> single target CPU out of the affinity mask and the actual target is = stored >>>> in the effective CPU mask, so destroying the user chosen affinity ma= sk >>>> which might contain more than one CPU is wrong. >>>> >>>> Change the implementation so that the channel is bound to CPU0 at th= e XEN >>>> level and leave the affinity mask alone. At startup of the interrupt= >>>> affinity will be assigned out of the affinity mask and the XEN bindi= ng will >>>> be updated. >>> >>> >>> If that's the case then I wonder whether we need this call at all and= instead bind at startup time. >> >> This binding to cpu0 was introduced with commit 97253eeeb792d61ed2 >> and I have no reason to believe the underlying problem has been >> eliminated. >=20 > "The kernel-side VCPU binding was not being correctly set for newl= y > allocated or bound interdomain events. In ARM guests where 2-lev= el > events were used, this would result in no interdomain events bein= g > handled because the kernel-side VCPU masks would all be clear. >=20 > x86 guests would work because the irq affinity was set during irq= > setup and this would set the correct kernel-side VCPU binding." >=20 > I'm not convinced that this is really correctly analyzed because affini= ty > setting is done at irq startup. >=20 > switch (__irq_startup_managed(desc, aff, force)) { > case IRQ_STARTUP_NORMAL: > ret =3D __irq_startup(desc); > irq_setup_affinity(desc); > break; >=20 > which is completely architecture agnostic. So why should this magically= > work on x86 and not on ARM if both are using the same XEN irqchip with > the same irqchip callbacks. I think this might be related to _initial_ cpu binding of events and changing the binding later. This might be handled differently in the hypervisor. Juergen --------------C0A97F76D1E2DDEBCBB7C379 Content-Type: application/pgp-keys; name="OpenPGP_0xB0DE9DD628BF132F.asc" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="OpenPGP_0xB0DE9DD628BF132F.asc" -----BEGIN PGP PUBLIC KEY BLOCK----- xsBNBFOMcBYBCACgGjqjoGvbEouQZw/ToiBg9W98AlM2QHV+iNHsEs7kxWhKMjrioyspZKOBy= cWx w3ie3j9uvg9EOB3aN4xiTv4qbnGiTr3oJhkB1gsb6ToJQZ8uxGq2kaV2KL9650I1SJvedYm8O= f8Z d621lSmoKOwlNClALZNew72NjJLEzTalU1OdT7/i1TXkH09XSSI8mEQ/ouNcMvIJNwQpd369y= 9bf IhWUiVXEK7MlRgUG6MvIj6Y3Am/BBLUVbDa4+gmzDC9ezlZkTZG2t14zWPvxXP3FAp2pkW0xq= G7/ 377qptDmrk42GlSKN4z76ELnLxussxc7I2hx18NUcbP8+uty4bMxABEBAAHNHEp1ZXJnZW4gR= 3Jv c3MgPGpnQHBmdXBmLm5ldD7CwHkEEwECACMFAlOMcBYCGwMHCwkIBwMCAQYVCAIJCgsEFgIDA= QIe AQIXgAAKCRCw3p3WKL8TL0KdB/93FcIZ3GCNwFU0u3EjNbNjmXBKDY4FUGNQH2lvWAUy+dnyT= hpw dtF/jQ6j9RwE8VP0+NXcYpGJDWlNb9/JmYqLiX2Q3TyevpB0CA3dbBQp0OW0fgCetToGIQrg0= MbD 1C/sEOv8Mr4NAfbauXjZlvTj30H2jO0u+6WGM6nHwbh2l5O8ZiHkH32iaSTfN7Eu5RnNVUJbv= oPH Z8SlM4KWm8rG+lIkGurqqu5gu8q8ZMKdsdGC4bBxdQKDKHEFExLJK/nRPFmAuGlId1E3fe10v= 5QL +qHI3EIPtyfE7i9Hz6rVwi7lWKgh7pe0ZvatAudZ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3bxALOknAp4dN3QwBYCKuZ7AddY9yjynVaD5X7nF9nO5BjR/i1DG86lem3iBDX= zXs ZDn8R38=3D =3D2wuH -----END PGP PUBLIC KEY BLOCK----- --------------C0A97F76D1E2DDEBCBB7C379-- --W7MOwpcHMEZDHVpnNeRdRpRviypq0k3b2-- --JLZob3e3TcGZaffU2V6GYg9zw25iTy30k Content-Type: application/pgp-signature; name="OpenPGP_signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="OpenPGP_signature" -----BEGIN PGP SIGNATURE----- wsB5BAABCAAjFiEEhRJncuj2BJSl0Jf3sN6d1ii/Ey8FAl/TSJEFAwAAAAAACgkQsN6d1ii/Ey+l mgf/d2+/6FRTlqTIKtgTaI9zWYXHFZUVv6aYW6iBE6VxANXvSWq9HMk6KnsreMEFtZ6/gFqr/hEu oLKI4zId8FjcveupY8yiEXvBkWDXXQHXm2vw2fO6Fe2D0RCcR0QLeFpvolQBAp0s4pGQNCWixekr Q6YyAWOKOmAjWmLsSsyend9GfjL+BFR6pObB4CLRdm5rvQHbPW6pNHBTTX2bxeszchEibXqmy+eX K7jbAijkr/Vq+9h84FBdAOZQRgXCIrWI14ae2O+8CGs9w5v/Yczedv+z4knUyDtXHly4+zuhkPSW tmVXo5DD0Oh4PaNITuXRo6Y9sSrWG1w22F+SVn8vKg== =c494 -----END PGP SIGNATURE----- --JLZob3e3TcGZaffU2V6GYg9zw25iTy30k--