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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1515EC433F5 for ; Wed, 23 Mar 2022 08:56:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242964AbiCWI6P (ORCPT ); Wed, 23 Mar 2022 04:58:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57694 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237212AbiCWI6N (ORCPT ); Wed, 23 Mar 2022 04:58:13 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 433DA5EDFD for ; Wed, 23 Mar 2022 01:56:43 -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 dfw.source.kernel.org (Postfix) with ESMTPS id 77B4C617A8 for ; Wed, 23 Mar 2022 08:56:43 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DE46DC340E8; Wed, 23 Mar 2022 08:56:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1648025802; bh=bQwHdsTWRnIH0VNaCAAZd6d15onghCKnS/5tM3JxI/w=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=CAe9G2sTLVEPyCbtFs3ggx98dbvBw1ifk3W9IEAbyhOKPQf+lFsMKYB0EF/arXX5w 2JBUA3h/2WBPTG8SCfaW4h1dc9wfzVF+XOEzheYwbrAtkLzc35iMqTytJyPUoGTQDw Zzn2R9e0e+QBqk91vICgYgZyd6zRfRH8KjfB4FQtb8kryBwBhcRESTvlu35B19WrsN upkM63YHn8+dW6xABXKwor52iOty/cevjXEOQzWK2/s0BcDjkfcNsdG52NNnN23KV2 5liwwcfvgxJXELMfIqX9OFZnuP+ByIlXLNdSi7AoEFZqRipGbJPFNOeuiCF90C0LMV zCrmpZh6yqnwA== 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 1nWwnI-00GSIb-BE; Wed, 23 Mar 2022 08:56:40 +0000 Date: Wed, 23 Mar 2022 08:56:40 +0000 Message-ID: <87a6dhxd13.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> 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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. Thanks, M. [1] https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms.git/log/?h=irq/managed-affinity-fixes -- Without deviation from the norm, progress is not possible.