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 41B5BC87FCB for ; Fri, 1 Aug 2025 12:32:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Type:MIME-Version: References:In-Reply-To:Subject:Cc:To:From:Message-ID:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=KJjg0ex3AP1Zic8vbkbJGfMXgX+9AGkX7uoCAxlYmuM=; b=eUOGuqlAk1tKpcYHQzz2Tjkre7 OLBpvgMM1/Q8h5Bmmqddetw9ANvqv8lfqFRU4wm+YF30ZZfkXnm8maw66H1Lqi2bPHqQmf1EXRj8y nFQ9wNWQZXUlYuGZLeDd95tdaDEKI0CFvC733Ox/V9Tazwpn+KxwGhTxzTyPb78qFIH5+TwErj6h2 H1xcS/wzpzcVZ2RhGxwDnjF42+sei6Hoh96O4CpM5arkVzhZt8spouTLe+Axnz2RlJgAySJ7+9gXb FI1tEU9H8F9icwf826O0S5OBEL3sxfU4SLemtadyFnRdQG5ciVLrT8EDKzGNVmkvqD2hEKKFMfQHf TE+eLdAw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1uhowI-00000005xXa-2yTo; Fri, 01 Aug 2025 12:32:46 +0000 Received: from nyc.source.kernel.org ([147.75.193.91]) by bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux)) id 1uhoSG-00000005cr5-1zWy for linux-arm-kernel@lists.infradead.org; Fri, 01 Aug 2025 12:01:45 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by nyc.source.kernel.org (Postfix) with ESMTP id 4BE36A557FF; Fri, 1 Aug 2025 12:01:43 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id EF2F4C4CEE7; Fri, 1 Aug 2025 12:01:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1754049703; bh=uOoLORZbVz/2DjHrvQwdE/xKoSWkkYOsM2fYvuYSxFs=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=h+/JIR9nibIna+akEcLThAyq6TgJbtwZzNpTbQWAatG3VAMzBqM3DKsQp6hY2ycFo 81JXKMc/UEQQVZOUC2uzJ+XuHJjO/2Ia9P4fsBUKScsKVtGNLcoBA5txTHyTc65CmY bIA7Xf9OkC5Xr/bYvGx2kRj+W1jdWOqyhBqa3zNGbDlXuUFGTx2JgCEQUrsJj8Rj/1 lqjMt5lHDaCERJFddCo1ocjpq2aHU9TklTLEAmxwzNmCRKAycow3Gn7WjFbeuMA0My H64+VHCaL/v9r75YkjCVZMBn1hZ/QnfuUAccGGDJ3ZZHE+NIaYPL64bFcLTq+AD7RR VkKizrKCltwZQ== 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 1uhoSB-003Bli-P7; Fri, 01 Aug 2025 13:01:40 +0100 Date: Fri, 01 Aug 2025 13:01:38 +0100 Message-ID: <86y0s36yjh.wl-maz@kernel.org> From: Marc Zyngier To: wangwudi Cc: Thomas Gleixner , , , , , Zenghui Yu Subject: Re: Question on the scheduling of timer interrupt and FIO interrupt In-Reply-To: <8c6eb963-0a3a-8b75-8ab4-a0b2e10f3d40@hisilicon.com> References: <8c6eb963-0a3a-8b75-8ab4-a0b2e10f3d40@hisilicon.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/30.1 (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: wangwudi@hisilicon.com, tglx@linutronix.de, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, yangwei24@huawei.com, yaohongshi@hisilicon.com, zenghui.yu@linux.dev 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-20250801_050144_647247_3B6C0D85 X-CRM114-Status: GOOD ( 21.71 ) 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org + Zenghui, in case he has seen this before. On Fri, 01 Aug 2025 07:26:20 +0100, wangwudi wrote: > > Hi, all > When running some FIO tests on ARM64 server(Kunpeng), frequent NVMe interrupts occupy the > CPU, and the CPU's hardirq load is 100%. The watchdog feed interrupt arch_timer cannot be > responded, triggering the hardlockup. I am extremely surprised that even with a screaming NVMe (or even several of them), you end up in a situation where you don't have the resource to take the timer interrupt. > > GIC driver uses GICV3_PRIO_IRQ to set the same priority for arch_timer interrupt and NVMe > interrupt. In GIC spec, "If, on a particular CPU interface, multiple pending interrupts > have the same priority, and have sufficient priority for the interface to signal them to > the PE, it is IMPLEMENTATION DEFINED how the interface selects which interrupt to signal." > Shell we consider setting a higher priority for the arch_timer interrupt to fix this case? Linux only deals with two priorities: the normal interrupt priority, and NMI, where the NMI can preempt any other interrupt. obviously, we don't want to make the timer an NMI, as it would break a lot of things. Which means that even if you were to give the timer a higher priority, it should not be allowed to preempt any other interrupt. Which means that you'd need to set the binary point so that both the NVMe and timer priorities fall into the same preemption bucket. But it also means that you now are eating into the few bits of priority that we have, and that will cause problems with the NMI priority. Also, how to you decide what interrupts should be of a higher priority? I find it surprising that your GIC doesn't have some form of round-robin scheme to pick the next HPPI, because that's clearly a fairness problem, and punting that on SW is pretty ugly. Thanks, M. -- Without deviation from the norm, progress is not possible.