Received: by 2002:a05:6358:53a8:b0:117:f937:c515 with SMTP id z40csp381499rwe; Fri, 14 Apr 2023 04:29:01 -0700 (PDT) X-Google-Smtp-Source: AKy350bOsEyl6Soj13HQqZubsE9kbhCzT23+SuRChQHIPiOxd+tuKs6m9PLKK+zB8fs5WFcEAo1c X-Received: by 2002:aa7:8887:0:b0:627:ea7a:ff46 with SMTP id z7-20020aa78887000000b00627ea7aff46mr7842727pfe.16.1681471740904; Fri, 14 Apr 2023 04:29:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681471740; cv=none; d=google.com; s=arc-20160816; b=eWSlcK1Xl5xY9p/qWQHcETK+05Ix0c1bQA11CTvoryr92UfgWiMjyNV1S0HNkhsMHH of7Kp3AiyU14ehuIy5YzDvNQD2WmQNnTkUUmn+sh4d/0dZKr/HV2j21svEuLXcGUra91 cvPBbPm+o13CKn2UXLBCO8UIcFlp1u4aRRVheEDBANzpLrxs6IkiPKT8yh3KFfkya39k Rx5a+B1eviS+Iw3X7qGVjRh/g/wQEQc8ACGk0MBsvLsygWhATuCPfNni9kUbw+57+Ywp lx0xzcMV4R5xVcmI5OgMjmERJZQ6ki9nvpPIj/dX52pJqsj5CYoEpju6hCBKnateESKJ aaRg== 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=MNhpGend0MT11k0Rs91A6MSajazRLWQ7xREml9bU3C4=; b=j0afwubCf5qYIYXAlwHqimy/0ma0EiPM2E8MRjgXxTf84PikKorEf8nc5kb0CZxK2P yX9z++1kyjfEwfimJ70gCXwycNvYzF2Z8YHzbdbxv2e9E656yS+MFNtjclnCmu3VNncc MixfQeAdNZ1IS5l952FJ/3hf74sxDmfOZ67UEJHkChcOxdtMxlWh7SvSnUzj0W6OQIgo QX6MhlTzdDYaYFKjKK/keiQXlwmMoe1DAw79UGdufdMxodn3pqcu3wm8tGhpbNqb8PoI wC3rrHKZPYoszQxC6lJgv9m5vNixNb/HThof7SiRt2GxW6y0/4Ko9HZtclmoLWKgHJv0 eWMQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=pBRmthrI; 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 b25-20020aa79519000000b0062b24b48726si4145247pfp.123.2023.04.14.04.28.50; Fri, 14 Apr 2023 04:29:00 -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=pBRmthrI; 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 S229735AbjDNLZ5 (ORCPT + 99 others); Fri, 14 Apr 2023 07:25:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56078 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229476AbjDNLZ4 (ORCPT ); Fri, 14 Apr 2023 07:25:56 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9A7A910F2 for ; Fri, 14 Apr 2023 04:25:55 -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 34CE9646EF for ; Fri, 14 Apr 2023 11:25:55 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 96366C433EF; Fri, 14 Apr 2023 11:25:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1681471554; bh=XFBlMOuCo4+PbzTxFmrpNsgf0hWfPNLySwQG3Sw3a94=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=pBRmthrIR5xCJG02+D4Fg7Zt+RgvmA18HL3SU3hNNcXieDwzqg5F0XmjvuXasxEnV CDtm2aAkiOjZQPjnzsCNkPPa7hF5gV8SmTHQRlcqvJ2WGWTz+nEqE+35MHbMPyU+i/ wbJ3C+iz/MqhnCMoOee6XQaODHeGuiv+ibcT3SLlZB3+X6sULWrotNMV9R9Fy8BU1k 69Qq5Kq4V1O+FqmjYrzNKXv9VRJtY3omSwdBmJiHdLFBNJJK1KqGjXWIS43fjOrNsp BDkht7tJPXRGWWUkWEHnL60faTpPj/iAGeG19cgXBjJyzxLA8+VBRc1xpYhSTTxDy6 hdOa6ebWBXSyQ== Received: from sofa.misterjones.org ([185.219.108.64] helo=goblin-girl.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1pnHYu-008Kkg-8c; Fri, 14 Apr 2023 12:25:52 +0100 Date: Fri, 14 Apr 2023 12:25:51 +0100 Message-ID: <86edomln7k.wl-maz@kernel.org> From: Marc Zyngier To: Yipeng Zou Cc: , , , , , , , , , James Gowans Subject: Re: [RFC PATCH] genirq: introduce handle_fasteoi_edge_irq flow handler In-Reply-To: <20230310101417.1081434-1-zouyipeng@huawei.com> References: <20230310101417.1081434-1-zouyipeng@huawei.com> 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/28.2 (aarch64-unknown-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: zouyipeng@huawei.com, tglx@linutronix.de, samuel@sholland.org, oleksandr_tyshchenko@epam.com, andy.shevchenko@gmail.com, apatel@ventanamicro.com, lvjianmin@loongson.cn, linux-kernel@vger.kernel.org, chris.zjh@huawei.com, liaochang1@huawei.com, jgowans@amazon.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=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, 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 Fri, 10 Mar 2023 10:14:17 +0000, Yipeng Zou wrote: > > Recently, We have a LPI migration issue on the ARM SMP platform. > > For example, NIC device generates MSI and sends LPI to CPU0 via ITS, > meanwhile irqbalance running on CPU1 set irq affinity of NIC to CPU1, > the next interrupt will be sent to CPU2, due to the state of irq is > still in progress, kernel does not end up performing irq handler on > CPU2, which results in some userland service timeouts, the sequence > of events is shown as follows: > > NIC CPU0 CPU1 > > Generate IRQ#1 READ_IAR > Lock irq_desc > Set IRQD_IN_PROGRESS > Unlock irq_desc > Lock irq_desc > Change LPI Affinity > Unlock irq_desc > Call irq_handler > Generate IRQ#2 > READ_IAR > Lock irq_desc > Check IRQD_IN_PROGRESS > Unlock irq_desc > Return from interrupt#2 > Lock irq_desc > Clear IRQD_IN_PROGRESS > Unlock irq_desc > return from interrupt#1 > > For this scenario, The IRQ#2 will be lost. This does cause some exceptions. Please see my reply to James at [1]. I'd appreciate if you could give that patch a go, which I expect to be a better avenue to fix what is effectively a GIC architecture defect. Thanks, M. [1] https://lore.kernel.org/all/86pm89kyyt.wl-maz@kernel.org/ -- Without deviation from the norm, progress is not possible.