Received: by 2002:a05:6a10:83d0:0:0:0:0 with SMTP id o16csp44117pxh; Thu, 7 Apr 2022 13:28:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwFfAxs3c9p7vw7rSL5QKwJwRUNucodwqfBsxoNxpbrcSVRZdZDK95Y/egdZyA4mCC4vOgm X-Received: by 2002:a05:6a00:2186:b0:4f7:5544:1cc9 with SMTP id h6-20020a056a00218600b004f755441cc9mr15853082pfi.62.1649363286017; Thu, 07 Apr 2022 13:28:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649363286; cv=none; d=google.com; s=arc-20160816; b=r271WesAHgZXorGfQdEJNUrxVls1+NOai5frD4IKfx24dbmAi3VLZHRQTty9j5nivN iXT7RLUNMTrOJOzRdHMxMO8GBtKQnlhNQG5nnX8Cz5/ZYtJJ1fXA//QnSL1pAqqBYEQ0 Mn1/Bza2X2y0Jdzl1t1e2hrWM1f0sLWgpdTI0waF6KJiLhip6y9xKvoXC9YukWZWsFZO 39zAUMDfSB3sdf7lM/RHbFXRrGDegBplF0dGoswdtahjdp8+jwDhODVtKDu+x0DztKVx w8ZVsrGbMke6HztWrPkoIX9hOMPVtjUxMDUGhR9SySCY6Exdm+hJx09g/jESTUFAetsW PUzw== 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:from :references:cc:to:subject:user-agent:mime-version:date:message-id; bh=+Gy6VQrv11ooufIhZKgbrFjrRajrhqm5Mvq6dUxWi5A=; b=URzlhhfQLWV4xZqcjohVwhbyM96Xe6RbE8b5mo6m/xPZMrpDo1FB3GQjsqhDWLDNO1 rIHNie/v7LlvJwnua7PRXntuMhAi1ocHxXsb2ihXzIWZZBkmvhtcy0ITPncYaQeVwiSF XW2Qo8b+5vQfJI4r/NnHHzyU7gKtXZh2Qiy9i+dIA5yfYtui8kKZUx3GXND2Qb3TkDQF 2E2zrkcY4TOqjZ65wxeeBDBN5ioQMEr85Dtg7ztOUZ5dHbtK2saItbMVic8uX34/Fi+a MFrzI5EppfD2+sNXpAB+E0Oc9jBuDLsMsnJ80kmCpcm3v+LS6RjxoW1OPSMW7G3f91+4 TeQg== ARC-Authentication-Results: i=1; mx.google.com; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id s13-20020a170902ea0d00b001561b99e90asi738231plg.235.2022.04.07.13.28.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Apr 2022 13:28:06 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id CF4E7365A25; Thu, 7 Apr 2022 12:43:29 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346403AbiDGRdK (ORCPT + 99 others); Thu, 7 Apr 2022 13:33:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36396 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346840AbiDGRc7 (ORCPT ); Thu, 7 Apr 2022 13:32:59 -0400 Received: from frasgout.his.huawei.com (frasgout.his.huawei.com [185.176.79.56]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A663F10DA5D for ; Thu, 7 Apr 2022 10:30:04 -0700 (PDT) Received: from fraeml707-chm.china.huawei.com (unknown [172.18.147.200]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4KZ7cs0T8dz67XcG; Fri, 8 Apr 2022 01:27:57 +0800 (CST) Received: from lhreml724-chm.china.huawei.com (10.201.108.75) by fraeml707-chm.china.huawei.com (10.206.15.35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Thu, 7 Apr 2022 19:30:01 +0200 Received: from [10.47.95.175] (10.47.95.175) by lhreml724-chm.china.huawei.com (10.201.108.75) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Thu, 7 Apr 2022 18:30:00 +0100 Message-ID: Date: Thu, 7 Apr 2022 18:29:58 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.6.1 Subject: Re: [PATCH v3 0/3] genirq: Managed affinity fixes To: Marc Zyngier , linux-kernel CC: Thomas Gleixner , Xiongfeng Wang , David Decotigny References: <20220405185040.206297-1-maz@kernel.org> From: John Garry In-Reply-To: <20220405185040.206297-1-maz@kernel.org> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.47.95.175] X-ClientProxiedBy: lhreml738-chm.china.huawei.com (10.201.108.188) To lhreml724-chm.china.huawei.com (10.201.108.75) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-4.7 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A, RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 05/04/2022 19:50, 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.18-rc1, addresses the above. Hi Marc, Please let me know if you require anything more from me on this one. I was hoping that Xiongfeng would verify that his "housekeeping" issues were fixed. Cheers > > Thanks, > > M. > >>From v2 [4]: > - Rebased on 5.18-rc1 > > [1] https://lore.kernel.org/r/78615d08-1764-c895-f3b7-bfddfbcbdfb9@huawei.com > [2] https://lore.kernel.org/r/20220124073440.88598-1-wangxiongfeng2@huawei.com > [3] https://lore.kernel.org/r/20220307190625.254426-1-maz@kernel.org > [4] https://lore.kernel.org/r/20220321193608.975495-1-maz@kernel.org > > Marc Zyngier (3): > genirq/msi: Shutdown managed interrupts with unsatifiable affinities > genirq: Always limit the affinity to online CPUs > irqchip/gic-v3: Always trust the managed affinity provided by the core > code > > drivers/irqchip/irq-gic-v3-its.c | 2 +- > kernel/irq/manage.c | 25 +++++++++++++++++-------- > kernel/irq/msi.c | 15 +++++++++++++++ > 3 files changed, 33 insertions(+), 9 deletions(-) >