Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp659031pxb; Thu, 24 Mar 2022 04:46:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyVOX+1YmYSwAfU7EsxzxenoidFyb5cvXlgJwXXS5bqz7RUJEEinvn/8+taTBizsnMCFlZ7 X-Received: by 2002:a62:d0c1:0:b0:4fa:81f5:b9d4 with SMTP id p184-20020a62d0c1000000b004fa81f5b9d4mr4920949pfg.49.1648122395952; Thu, 24 Mar 2022 04:46:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648122395; cv=none; d=google.com; s=arc-20160816; b=DeE+t9DLSqbjrdqPGbXAalTnZohvBKnPq2lsNCEQ76S/CQFAdQBpY0zIhPo2XCT0mt eOKSoc1sVtGetMkbI6rNXLOMJhwIOEuX0UNuNuu/xEX0Jbe6nQNktafzMH27awsStNXM RuzU6JexH/LJdIGcy/mOOrz839Z5ASgoZC/4FjlL+078AjKAGEifDMG7Q7E3XcjwmPDm paERcLsiIceRzx5IoyoRwbFH/vfodcszZW4iADu2T25aFQuQkDuBzfL2YQHO7oxwVex5 NUI/i5/LP2t35CRDW5QVMCFzOE0k55dwujgPC/PfTXPg667SaRd9aW9BWv8CjvjEA33y bQ1w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to :mime-version:user-agent:date:message-id:from:references:cc:to :subject; bh=Die6TxHoC9XUQB5Qqid5hm60hLVMEN0BCWWGvlElKfg=; b=WKN26FIjZDoRhvcpjNvut3PeefJ+ebk8VE9pGVRJYvUSOP5XrPZOuWZYB4CY1EA4T0 01R7fnN3BhcD3wNVFfGK/vLgY3vouFP5LuCNWtDktgQ2h7IWlI9/izcIMniKnLryv1we OVY51rWYGkqjU5HaFidRyh7tZMtRhZc3MsG6+1c/qzGdOorOZUZjPflDW6CtTSpaNba/ ozrA00hSF7mvVgMW40USkl2tOIpvxH9hX8lhXfLk4yubWpS2MRQI+KGsPS3b/uogD8m2 JO0wKNw5F7M9JJwN6tS2P6ZzIjxF6DaVvcxx4FUz9tfBwwDgZZ9wCTTV2KGjV9U0smc2 NPIg== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c21-20020a056a000ad500b004fa3a8e0044si17518753pfl.251.2022.03.24.04.46.19; Thu, 24 Mar 2022 04:46:35 -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; 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=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243664AbiCWLAN (ORCPT + 99 others); Wed, 23 Mar 2022 07:00:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55006 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243681AbiCWLAK (ORCPT ); Wed, 23 Mar 2022 07:00:10 -0400 Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C0323265D for ; Wed, 23 Mar 2022 03:58:36 -0700 (PDT) Received: from dggpemm500023.china.huawei.com (unknown [172.30.72.55]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4KNlf26pJnzCr24; Wed, 23 Mar 2022 18:56:26 +0800 (CST) Received: from dggpemm500002.china.huawei.com (7.185.36.229) by dggpemm500023.china.huawei.com (7.185.36.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.21; Wed, 23 Mar 2022 18:58:34 +0800 Received: from [10.174.179.5] (10.174.179.5) by dggpemm500002.china.huawei.com (7.185.36.229) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.21; Wed, 23 Mar 2022 18:58:33 +0800 Subject: Re: [PATCH v2 0/3] genirq: Managed affinity fixes To: Marc Zyngier CC: linux-kernel , Thomas Gleixner , John Garry , David Decotigny References: <20220321193608.975495-1-maz@kernel.org> <87a6dhxd13.wl-maz@kernel.org> From: Xiongfeng Wang Message-ID: Date: Wed, 23 Mar 2022 18:58:33 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 MIME-Version: 1.0 In-Reply-To: <87a6dhxd13.wl-maz@kernel.org> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.174.179.5] X-ClientProxiedBy: dggems702-chm.china.huawei.com (10.3.19.179) To dggpemm500002.china.huawei.com (7.185.36.229) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,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 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'. Thanks, Xiongfeng > > Thanks, > > M. > > [1] https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms.git/log/?h=irq/managed-affinity-fixes >