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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 96FB8C47422 for ; Fri, 26 Jan 2024 10:53:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Subject:Cc:To:From:Message-ID:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=CjseETAKf9nDW639VLS81Rv7C5Y+rd0hlUUSz1Oxm1E=; b=K9RIhi3M0jfcfv J7uX7eJpbdZbLbOq+E62zXLrcpkeLatTD/Bl6kVzxkvW1ws5ehH9v62iqOSxINizw6SeUxirMtV92 kCobDMIQxMzzjtJxtytf0BZFAhFgUoOA2HFNwVZIdqE//69YZPrG5JZPwQOoZEK9Lfaja/7RfC4BX GU66yVuAnpueujTsM/nfehLZ+kiArB9x2M25TEekEpxuRw1qiTDBN9jziKCuxflKqgxwnISecfjX+ 6ae1SKMlNToMVNzvXgOB/Xm6W2w7JHkXCOxWtdR4TBf0+ITcwkCr4+Q/QHRdo1x09G0puinsW3Wpo gHkd+zg4cJsetEIf8TWg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rTJpU-00000003u4Y-31XL; Fri, 26 Jan 2024 10:53:00 +0000 Received: from dfw.source.kernel.org ([139.178.84.217]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rTJpS-00000003u3Q-0WA3 for linux-arm-kernel@lists.infradead.org; Fri, 26 Jan 2024 10:52:59 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 676C762481; Fri, 26 Jan 2024 10:52:27 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 17C1FC433F1; Fri, 26 Jan 2024 10:52:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1706266347; bh=tlcK5LgVuWz8xtFYtnpZEz5lTl9XOwv1OXh/bM5AUyA=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=o7jHf37Pn430PnhlaA+dzM8C0VCirwL3CTNmKJUM1EGYvTjyEwpEkFyh1qVvPf9DR jM9r7XbsOhzr6AWqu4gLlxLZli+DGiSR6q+czZO1SROP7uiyWy5J7EVOunJi3QzK2K LFc7psCvo1GTHNlhD4jnjpd9ACIFZi1HAWcWIVp1tYJHd4DlEfdp4GSaK9tTv2jhFx uEjLrBlQkpDMORUkzqWN3vzP0JQjJ6pWwaX6DM/9HLBonqEYTN6VRuCp+y8QIdvJdw nXEVCCcLUCKESaCPYQDFXuxvFeBHpRKFpUqoEWCm+v5U4JkBcVFqAVWheLcqpp4ofl upvvMYFbLufAg== 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 1rTJou-00F1h0-RG; Fri, 26 Jan 2024 10:52:25 +0000 Date: Fri, 26 Jan 2024 10:52:24 +0000 Message-ID: <86ttn074ev.wl-maz@kernel.org> From: Marc Zyngier To: Kunkun Jiang Cc: Oliver Upton , James Morse , Suzuki K Poulose , Zenghui Yu , Thomas Gleixner , , , Subject: Re: [PATCH v2 1/2] irqchip/gic-v4.1: Fix GICv4.1 doorbell affinity In-Reply-To: <20240126103012.1020-2-jiangkunkun@huawei.com> References: <20240126103012.1020-1-jiangkunkun@huawei.com> <20240126103012.1020-2-jiangkunkun@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/29.1 (aarch64-unknown-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: jiangkunkun@huawei.com, oliver.upton@linux.dev, james.morse@arm.com, suzuki.poulose@arm.com, yuzenghui@huawei.com, tglx@linutronix.de, linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev, wanghaibin.wang@huawei.com X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240126_025258_276279_87433BDB X-CRM114-Status: GOOD ( 23.93 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Fri, 26 Jan 2024 10:30:11 +0000, Kunkun Jiang wrote: > > dd3f050a216e make an optimization, VMOVP can be skipped if moving > VPE to a cpu whose RD is sharing its VPE table with the current one. > But when skipping VMOVP, the affinity recorded in irq_data is still > updated. This causes the doorbell affinity recorfed in the irq_data > to be inconsistent with the actual. > > In corner case, this may result in lost interrupts: > 0. Each cpu die shares a VPE table and contains 32 CPUs > die0(CPU0-31) die1(CPU32-63)... > 1. VPE resides on CPU32, doorbell affinity to CPU32. > 2. Move VPE to CPU33, skip VMOVP, doorbell still affinity to CPU32. > The affinity recorded in irq_data is CPU33. > 3. Manually offline CPU32 on the host side: > 'echo 0 > /sys/devices/system/cpu/cpu32/online' > 4. Core code cannot move the doorbell affinity to CPU32, since the > record in irq_data is CPU33. > 5. Subsequent doorbell interrupts will be lost. > > So affinity recoreded in irq_data should not be updated when skipping > VMOVP. > > Fixes: dd3f050a216e (irqchip/gic-v4.1: Implement the v4.1 flavour of VMOVP) > Signed-off-by: Kunkun Jiang > --- > drivers/irqchip/irq-gic-v3-its.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/drivers/irqchip/irq-gic-v3-its.c b/drivers/irqchip/irq-gic-v3-its.c > index d097001c1e3e..4b1dbb697959 100644 > --- a/drivers/irqchip/irq-gic-v3-its.c > +++ b/drivers/irqchip/irq-gic-v3-its.c > @@ -3850,8 +3850,9 @@ static int its_vpe_set_affinity(struct irq_data *d, > its_send_vmovp(vpe); > its_vpe_db_proxy_move(vpe, from, cpu); > > -out: > irq_data_update_effective_affinity(d, cpumask_of(cpu)); > + > +out: > vpe_to_cpuid_unlock(vpe, flags); > > return IRQ_SET_MASK_OK_DONE; This is becoming *very* annoying. I've already told you this patch was wrong, yet you keep sending it (twice in just over an hour). M. -- Without deviation from the norm, progress is not possible. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel