Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp5875653rwl; Wed, 22 Mar 2023 03:40:10 -0700 (PDT) X-Google-Smtp-Source: AK7set+xkCQtmFKi3h+fDiUtv9GFGZFZl+3G/fhiokCLRle6x0vqUXnZtKYgdvTgoNQiH6vdRuKn X-Received: by 2002:a17:906:d8c:b0:92f:fbac:69c4 with SMTP id m12-20020a1709060d8c00b0092ffbac69c4mr6482884eji.56.1679481610345; Wed, 22 Mar 2023 03:40:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679481610; cv=none; d=google.com; s=arc-20160816; b=dW4Zc8lWJq0DaHbd9jpXcEdvEu5S87ErO3DnN9OTRvnhe35PKNbMrGTVUF33DD9k6a uq2lDaLlfju++E8Ha/0NDus8bkMG1oJWEdeyNzSVZ5kVZC4AbPm8qQq2JBgrpmviSCmJ mavRnAYjjrPBdFL3pICIudV4PKaoeweLmxVfv2STtPrut7aSyG52QhjnbVRnhUwXm7Ue dhgO3BxNRDENsgou/kZwcww9a4HjdfZPHpScSoAPEA+j04d7usArauTnh1ww2wI7HkvO NGNWAYoV/4R0w4yZN/mFbooeOc80W3fWxQMkuTEOQDFIWxPCZqO2XxuelmyXvWl9J6Tr Op9Q== 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 :content-language:references:cc:to:subject:from:user-agent :mime-version:date:message-id; bh=w0ciaxQqqDtQzhFprjY9a+ubbLR1SEaG40yrckn8ipw=; b=MUSKQc7/KSEswOZXq7hgMK1/itWuHMhdjxFqVqk1Wz5sId5VM5DXCmCla7WcPd77i1 J8Eb9DWVCDjEwoTqeKycRjBfq5KRDq3bzqmWWc/OnSnpvkQHPRwwWFwP5PLdmRyodtsi 5bv+rUHkEosly5I4bMpKvB4fZm2qOeueN5h+5kh/WklUkJ2mZl0YF0vJMZ4NCPZVJd5o 2pF1/Be7CrtsX4c0xQBCgEihvUugJOvTTdaaO/Q+/tNkjbWh2k5wyiFzuLPSC/apOM2V DdA2gGBeuuSsHiEzAlv11R1SKQa+fP9TWf0x+xFB742tSAPo5S1lbmxeuGgQ5JC8Px5f JmDA== 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 ga35-20020a1709070c2300b00932fe3cf171si13974191ejc.172.2023.03.22.03.39.46; Wed, 22 Mar 2023 03:40:10 -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 S230289AbjCVKit (ORCPT + 99 others); Wed, 22 Mar 2023 06:38:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51774 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230355AbjCVKik (ORCPT ); Wed, 22 Mar 2023 06:38:40 -0400 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0EEE658495 for ; Wed, 22 Mar 2023 03:38:22 -0700 (PDT) Received: from dggpemm500016.china.huawei.com (unknown [172.30.72.57]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4PhPxX1xlLznhwj; Wed, 22 Mar 2023 18:35:12 +0800 (CST) Received: from [10.67.111.115] (10.67.111.115) by dggpemm500016.china.huawei.com (7.185.36.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.21; Wed, 22 Mar 2023 18:38:19 +0800 Message-ID: Date: Wed, 22 Mar 2023 18:38:18 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.7.0 From: Yipeng Zou Subject: Re: [PATCH] irq: fasteoi handler re-runs on concurrent invoke To: "Gowans, James" , "tglx@linutronix.de" CC: "maz@kernel.org" , "Raslan, KarimAllah" , "Woodhouse, David" , "linux-kernel@vger.kernel.org" References: <20230317095300.4076497-1-jgowans@amazon.com> <001d516c1bb6f0b6d2344f1ae160e796d003c24c.camel@amazon.com> <6d1859b0-20f3-05a8-d8d6-dfb0c9985985@huawei.com> Content-Language: en-US In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-Originating-IP: [10.67.111.115] X-ClientProxiedBy: dggems705-chm.china.huawei.com (10.3.19.182) To dggpemm500016.china.huawei.com (7.185.36.25) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-2.3 required=5.0 tests=NICE_REPLY_A, RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_PASS 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 在 2023/3/22 15:48, Gowans, James 写道: > On Wed, 2023-03-22 at 14:26 +0800, Yipeng Zou wrote: >>> 在 2023/3/17 19:49, Gowans, James 写道: >>> What are your thoughts on this approach compared to your proposal? >> Hi, >> >> I also agree with you, enhance the existing generic handlers is a good >> way to go. >> >> Too many generic handlers really confuse developers. > Thomas, would you be open to taking the patch to tweak the handle_fasteoi_irq > handler? Or is there a different solution to this problem which you prefer? Our workaround is generally similar, but the implementation details are somewhat different. Maybe let us look for some comments from maintainer and other people. >> About CONFIG_GENERIC_PENDING_IRQ is actually some attempts we made >> before under the suggestion of Thomas. >> >> This patch is valid for our problem. However, the current config is only >> supported on x86, and some code modifications are required on arm. > Thanks for the patch! I have been trying out CONFIG_GENERIC_PENDING_IRQ too, but > couldn't get it to work; it seems the IRQ never actually moved. I see from your > patch that we would need to tweak the callbacks and explicitly do the affinity > move in the EOI handler of the chip; the generic code won't do it for us. > >> This has led to some changes in the original behavior of modifying >> interrupting affinity, from the next interrupt taking effect to the next >> to the next interrupt taking effect. > So this means that even if it's safe to change the affinity right now, the > change will actually be delayed until the *next* interrupt? Specifically because > interrupt doesn't have the IRQD_MOVE_PCNTXT state flag isn't set hence > irq_set_affinity_locked won't call irq_try_set_affinity? Yes, modify of the interrupt affinity will be delayed until the *next* interrupt eoi handler(in hard_irq context). This is the difference from x86, which do irq_move_irq in ack handler, and then transfer the current interrupt to the new CPU without other affect. > JG -- Regards, Yipeng Zou