Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp1773931pxb; Fri, 25 Mar 2022 05:29:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzn3v7rJ1xRRKRLX99zvW9Zmi0gblwzMr3i9DHOgujE2noxhdrq81Jg6mwY1Ff+xfxZLO+I X-Received: by 2002:a17:90a:5a86:b0:1bf:7860:c0f6 with SMTP id n6-20020a17090a5a8600b001bf7860c0f6mr24491069pji.213.1648211355991; Fri, 25 Mar 2022 05:29:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648211355; cv=none; d=google.com; s=arc-20160816; b=sABkjQwlTboH3XIYnZTbViFhFGLkukMwMc0XHbCC68n0qJ/PG8v94WnAZAyO9QKamm KQ7i6iF5WjJ+KFMnvP63M1w3V+yi7tl48sm64s9ZahpDKPkMrIdzBZv5sU8hgT22squf jXbLzV4pQULzthXLndjiGx6Fm/UEE8YVo6sqsuHBb8rrXEvDtLERxW5WYKDQORf1YBjM zAcNNcbq1N5zvjLo1jvtyEswhzW4gqlUSmA8YojGU7YEGpFdMZ4dbMNMIBQWk1x4xF8n nfyZxTmSNGzd1oVwEYW/6DLXv9vI/RXTMmr+Vuy2PYy7nvEX9KMu/CCcNFKOTLwikSru p3SQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:references:in-reply-to :subject:cc:to:from:message-id:date:dkim-signature; bh=tAxNWBC2twxBr6GK6nQeqvaL/aZ75sFUiODPB5RGIUs=; b=07Vo+MewoRWrkcYaBJBvGjSwGeAA+oFwBHSnhPaYsrJ9RrDOyNiW4M5wvXNutCSd0i /p/nmkdXmrFEnNKxtxJLLSSxwW3KML06qkDSIacyLAmsQVNjFprx3eEUXPwWs/T5SajJ +T+TEYFCTpZBN5NrcbuQ3EEIjTtNeImjVBOauB9J8uS9mBQVTIFNDHTETonNuYo+LYuz pIbLgmmL5gh/ufTP80tEDGVQRk3RcBsbgkxihxdoN7MNYxGdHyTd9RUXRqIker6SG5cx LcTiN2Jot8p5fitJWHrteV5/whu/cGfWNfD/THmnbyNrDC6CjJF9Hu+bSqP/N+xWmiyQ 441g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=NRiS72I2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id nn17-20020a17090b38d100b001bd14e0303csi2575169pjb.20.2022.03.25.05.29.04; Fri, 25 Mar 2022 05:29:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=NRiS72I2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235729AbiCWLdD (ORCPT + 99 others); Wed, 23 Mar 2022 07:33:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33054 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233311AbiCWLdC (ORCPT ); Wed, 23 Mar 2022 07:33:02 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C45AB716E2 for ; Wed, 23 Mar 2022 04:31:32 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 6E391B81E7C for ; Wed, 23 Mar 2022 11:31:31 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0ECDAC340E8; Wed, 23 Mar 2022 11:31:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1648035090; bh=kGhxhui6d7ENoM5hG46cnHHMw8ZF28hUfd5gsRjeg2s=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=NRiS72I27HHyrozZayrzaGgcdpYbZ+HEvCZUmvoD0wD6nTcL59U/gOonWvviIsR+8 WMbt4fP755sIwXx6t5DZZJaBGOVrSFLoUDk2XWTy7A/MSO1ooQQshT+S0Nfh4SXxBW nTsiFRcanLxluVkqCiKNpG6HEcyT8I7d6lwCiCWyDuskbsB2skPxEr7tuEHBm0qQk4 e1HvaAHGHvMEMpIQvoWlipjwLh1bJ9+qxVrjMRs+v66XBSCh8Bf4jYatEaWZ4EJTbB YVcx0+zGW/uoD6ntKv/c/Y+ap7/T3s1LkaWsaBHztD0KskgosFOY+1KDNofRP1m13h WqRQBpfQ4u0HQ== Received: from sofa.misterjones.org ([185.219.108.64] helo=why.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1nWzD5-00GTyX-ST; Wed, 23 Mar 2022 11:31:27 +0000 Date: Wed, 23 Mar 2022 11:31:27 +0000 Message-ID: <8735j8ykfk.wl-maz@kernel.org> From: Marc Zyngier To: Xiongfeng Wang Cc: linux-kernel , Thomas Gleixner , John Garry , David Decotigny Subject: Re: [PATCH v2 0/3] genirq: Managed affinity fixes In-Reply-To: References: <20220321193608.975495-1-maz@kernel.org> <87a6dhxd13.wl-maz@kernel.org> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/27.1 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: wangxiongfeng2@huawei.com, linux-kernel@vger.kernel.org, tglx@linutronix.de, john.garry@huawei.com, ddecotig@google.com X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false X-Spam-Status: No, score=-8.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 23 Mar 2022 10:58:33 +0000, Xiongfeng Wang wrote: > > > > On 2022/3/23 16:56, Marc Zyngier wrote: > > Hi Xiongfeng, > > > > On Wed, 23 Mar 2022 03:52:46 +0000, > > Xiongfeng Wang wrote: > >> > >> Hi, Marc > >> > >> On 2022/3/22 3:36, Marc Zyngier wrote: > >>> John (and later on David) reported[1] a while ago that booting with > >>> maxcpus=1, managed affinity devices would fail to get the interrupts > >>> that were associated with offlined CPUs. > >>> > >>> Similarly, Xiongfeng reported[2] that the GICv3 ITS would sometime use > >>> non-housekeeping CPUs instead of the affinity that was passed down as > >>> a parameter. > >>> > >>> [1] can be fixed by not trying to activate these interrupts if no CPU > >>> that can satisfy the affinity is present (a patch addressing this was > >>> already posted[3]) > >>> > >>> [2] is a consequence of affinities containing non-online CPUs being > >>> passed down to the interrupt controller driver and the ITS driver > >>> trying to paper over that by ignoring the affinity parameter and doing > >>> its own (stupid) thing. It would be better to (a) get the core code to > >>> remove the offline CPUs from the affinity mask at all times, and (b) > >>> fix the drivers so that they can trust the core code not to trip them. > >>> > >>> This small series, based on 5.17, addresses the above. > >> > >> I have tested this patchset on D06. It works well with kernel parameter > >> 'maxcpus=1' or 'nohz_full=1-127 isolcpus=nohz,domain,managed_irq,1-127'. > >> Also the 'effective_affinity' is correct. Thanks! > > > > Thanks for having given it a go. > > > >> By the way, I merged the second patch manually because of conflicts. > >> Maybe I lack some patches on your local repo. > > > > That's odd, as the patches are directly sitting on top of 5.17 in my > > tree (see [1]). Do you have any out of tree patches around? Please > > make sure you test this without any extra change. > > I apply the patchset based on the latest mainline kernel. The latest commit is > commit 3bf03b9a0839c9fb06927ae53ebd0f960b19d408 > Merge branch 'akpm' (patches from Andrew) > I didn't change the modification of the second patch. Only resolve the > context conflicts, which is cause by the following commit. > commit 04d4e665a60902cf36e7ad39af1179cb5df542ad > sched/isolation: Use single feature type while referring to housekeeping cpumask > It changed 'HK_FLAG_MANAGED_IRQ' to 'HK_TYPE_MANAGED_IRQ'. Ah, that's on top of linux/master then. Yeah, I expect some small conflicts (this is a popular spot). I'll rebase things at some point once (and if) we agree that patch #2 is the right thing to do. Thanks, M. -- Without deviation from the norm, progress is not possible.