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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 036B2C433F5 for ; Mon, 4 Oct 2021 16:31:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E545F61206 for ; Mon, 4 Oct 2021 16:31:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237145AbhJDQdd (ORCPT ); Mon, 4 Oct 2021 12:33:33 -0400 Received: from mail.kernel.org ([198.145.29.99]:49518 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237096AbhJDQdc (ORCPT ); Mon, 4 Oct 2021 12:33:32 -0400 Received: from disco-boy.misterjones.org (disco-boy.misterjones.org [51.254.78.96]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 2DA19611CA; Mon, 4 Oct 2021 16:31:43 +0000 (UTC) Received: from sofa.misterjones.org ([185.219.108.64] helo=why.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1mXQsP-00EgNx-7o; Mon, 04 Oct 2021 17:31:41 +0100 Date: Mon, 04 Oct 2021 17:31:40 +0100 Message-ID: <87v92crbtf.wl-maz@kernel.org> From: Marc Zyngier To: Pingfan Liu Cc: linux-arm-kernel@lists.infradead.org, "Paul E. McKenney" , Catalin Marinas , Will Deacon , Mark Rutland , Joey Gouly , Sami Tolvanen , Julien Thierry , Thomas Gleixner , Yuichi Ito , linux-kernel@vger.kernel.org Subject: Re: [PATCHv4 0/3] arm64/irqentry: remove duplicate housekeeping of rcu In-Reply-To: <20211001144406.7719-1-kernelfans@gmail.com> References: <20211001144406.7719-1-kernelfans@gmail.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/27.1 (x86_64-pc-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: kernelfans@gmail.com, linux-arm-kernel@lists.infradead.org, paulmck@kernel.org, catalin.marinas@arm.com, will@kernel.org, mark.rutland@arm.com, joey.gouly@arm.com, samitolvanen@google.com, julien.thierry@arm.com, tglx@linutronix.de, ito-yuichi@fujitsu.com, linux-kernel@vger.kernel.org X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 01 Oct 2021 15:44:03 +0100, Pingfan Liu wrote: > > When an IRQ is taken, some accounting needs to be performed to enter and > exit IRQ context around the IRQ handler. Historically arch code would > leave this to the irqchip or core IRQ code, but these days we want this > to happen in exception entry code, and architectures such as arm64 do > this. > > Currently handle_domain_irq() performs this entry/exit accounting, and > if used on an architecture where the entry code also does this, the > entry/exit accounting will be performed twice per IRQ. This is > problematic as core RCU code such as rcu_is_cpu_rrupt_from_idle() > depends on this happening once per IRQ, and will not detect quescent > periods correctly, leading to stall warnings. > > As irqchip drivers which use handle_domain_irq() need to work on > architectures with or without their own entry/exit accounting, this > patch makes handle_domain_irq() conditionally perform the entry > accounting depending on a new HAVE_ARCH_IRQENTRY Kconfig symbol that > architectures can select if they perform this entry accounting > themselves. > > V3 -> V4: > address Signed-off-by in [2/3] > improve commit log in [3/3] > > V2 -> V3: > Drop other patches and concentrate on the purpose of [3-4/5] of V2. > And lift the level, where to add {irq_enter,exit}_rcu(), from the > interrupt controler to exception entry > > History: > V1: https://lore.kernel.org/linux-arm-kernel/1607912752-12481-1-git-send-email-kernelfans@gmail.com > V2: https://lore.kernel.org/linux-arm-kernel/20210924132837.45994-1-kernelfans@gmail.com > V3: https://lore.kernel.org/linux-arm-kernel/20210930131708.35328-1-kernelfans@gmail.com > > > Cc: "Paul E. McKenney" > Cc: Catalin Marinas > Cc: Will Deacon > Cc: Mark Rutland > Cc: Marc Zyngier > Cc: Joey Gouly > Cc: Sami Tolvanen > Cc: Julien Thierry > Cc: Thomas Gleixner > Cc: Yuichi Ito > Cc: linux-kernel@vger.kernel.org > To: linux-arm-kernel@lists.infradead.org > > Mark Rutland (1): > arm64: entry: refactor EL1 interrupt entry logic > > Pingfan Liu (2): > kernel/irq: make irq_{enter,exit}() in handle_domain_irq() arch > optional > arm64: entry: avoid double-accounting IRQ RCU entry > > arch/arm64/Kconfig | 1 + > arch/arm64/kernel/entry-common.c | 47 +++++++++++++++++--------------- > kernel/irq/Kconfig | 3 ++ > kernel/irq/irqdesc.c | 4 +++ > 4 files changed, 33 insertions(+), 22 deletions(-) Given that most of the changes are in the arm64 tree, it'd be good if the whole series went via the arm64 tree, most probably as a fix. Thanks, M. -- Without deviation from the norm, progress is not possible. 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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E8374C433EF for ; Mon, 4 Oct 2021 16:33:43 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id BEAB36126A for ; Mon, 4 Oct 2021 16:33:43 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org BEAB36126A Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org 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=IiPS8rBl/va53562k2fXbuX8I5yGVAiwHTvjaIMewVs=; b=MXsrYmETQ8qrfe xUWxGpwI9V+8LqVH2akz9U4fYbRSlxq+X+vlEkIJuDbEto55sGrAQvYpKsMtEMUr2ts2NYBi6oyUX IjtLCiuNPTj1GSHig9Ej+8wSxNhLgRphtYpvpzPYLxMX4gpKyuze4J+7kbg+hbodYc1nMa1Y3Trgn rvBT7yhErkEGe68bgLKhtfu4b/SI8GQfLKMbZpCY/xM2NIUwPdHRF8av4eEgiLt9cTYOJJMR4VBFX /j5Mgl+xc6o5v5mfe9/E66VrAS1o58ensbHGzL0aKlocPULkFXKd1CZw7LvfEE3eMLdDkhw2JpvFR uF9+xLI5D6EvkTuXv+9g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mXQsW-0076gc-Gc; Mon, 04 Oct 2021 16:31:48 +0000 Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mXQsR-0076eR-E0 for linux-arm-kernel@lists.infradead.org; Mon, 04 Oct 2021 16:31:45 +0000 Received: from disco-boy.misterjones.org (disco-boy.misterjones.org [51.254.78.96]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 2DA19611CA; Mon, 4 Oct 2021 16:31:43 +0000 (UTC) Received: from sofa.misterjones.org ([185.219.108.64] helo=why.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1mXQsP-00EgNx-7o; Mon, 04 Oct 2021 17:31:41 +0100 Date: Mon, 04 Oct 2021 17:31:40 +0100 Message-ID: <87v92crbtf.wl-maz@kernel.org> From: Marc Zyngier To: Pingfan Liu Cc: linux-arm-kernel@lists.infradead.org, "Paul E. McKenney" , Catalin Marinas , Will Deacon , Mark Rutland , Joey Gouly , Sami Tolvanen , Julien Thierry , Thomas Gleixner , Yuichi Ito , linux-kernel@vger.kernel.org Subject: Re: [PATCHv4 0/3] arm64/irqentry: remove duplicate housekeeping of rcu In-Reply-To: <20211001144406.7719-1-kernelfans@gmail.com> References: <20211001144406.7719-1-kernelfans@gmail.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/27.1 (x86_64-pc-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: kernelfans@gmail.com, linux-arm-kernel@lists.infradead.org, paulmck@kernel.org, catalin.marinas@arm.com, will@kernel.org, mark.rutland@arm.com, joey.gouly@arm.com, samitolvanen@google.com, julien.thierry@arm.com, tglx@linutronix.de, ito-yuichi@fujitsu.com, linux-kernel@vger.kernel.org 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-20211004_093143_543800_DD21DA00 X-CRM114-Status: GOOD ( 27.75 ) 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, 01 Oct 2021 15:44:03 +0100, Pingfan Liu wrote: > > When an IRQ is taken, some accounting needs to be performed to enter and > exit IRQ context around the IRQ handler. Historically arch code would > leave this to the irqchip or core IRQ code, but these days we want this > to happen in exception entry code, and architectures such as arm64 do > this. > > Currently handle_domain_irq() performs this entry/exit accounting, and > if used on an architecture where the entry code also does this, the > entry/exit accounting will be performed twice per IRQ. This is > problematic as core RCU code such as rcu_is_cpu_rrupt_from_idle() > depends on this happening once per IRQ, and will not detect quescent > periods correctly, leading to stall warnings. > > As irqchip drivers which use handle_domain_irq() need to work on > architectures with or without their own entry/exit accounting, this > patch makes handle_domain_irq() conditionally perform the entry > accounting depending on a new HAVE_ARCH_IRQENTRY Kconfig symbol that > architectures can select if they perform this entry accounting > themselves. > > V3 -> V4: > address Signed-off-by in [2/3] > improve commit log in [3/3] > > V2 -> V3: > Drop other patches and concentrate on the purpose of [3-4/5] of V2. > And lift the level, where to add {irq_enter,exit}_rcu(), from the > interrupt controler to exception entry > > History: > V1: https://lore.kernel.org/linux-arm-kernel/1607912752-12481-1-git-send-email-kernelfans@gmail.com > V2: https://lore.kernel.org/linux-arm-kernel/20210924132837.45994-1-kernelfans@gmail.com > V3: https://lore.kernel.org/linux-arm-kernel/20210930131708.35328-1-kernelfans@gmail.com > > > Cc: "Paul E. McKenney" > Cc: Catalin Marinas > Cc: Will Deacon > Cc: Mark Rutland > Cc: Marc Zyngier > Cc: Joey Gouly > Cc: Sami Tolvanen > Cc: Julien Thierry > Cc: Thomas Gleixner > Cc: Yuichi Ito > Cc: linux-kernel@vger.kernel.org > To: linux-arm-kernel@lists.infradead.org > > Mark Rutland (1): > arm64: entry: refactor EL1 interrupt entry logic > > Pingfan Liu (2): > kernel/irq: make irq_{enter,exit}() in handle_domain_irq() arch > optional > arm64: entry: avoid double-accounting IRQ RCU entry > > arch/arm64/Kconfig | 1 + > arch/arm64/kernel/entry-common.c | 47 +++++++++++++++++--------------- > kernel/irq/Kconfig | 3 ++ > kernel/irq/irqdesc.c | 4 +++ > 4 files changed, 33 insertions(+), 22 deletions(-) Given that most of the changes are in the arm64 tree, it'd be good if the whole series went via the arm64 tree, most probably as a fix. Thanks, 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