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 97871C433EF for ; Wed, 29 Sep 2021 03:15:30 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 751BB61381 for ; Wed, 29 Sep 2021 03:15:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243874AbhI2DRJ (ORCPT ); Tue, 28 Sep 2021 23:17:09 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:55793 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230022AbhI2DRH (ORCPT ); Tue, 28 Sep 2021 23:17:07 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1632885325; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=VYUwZTajBKG73N6boXA2eLFqYW6+o4P9ejOOh0bWbFg=; b=ET73G2qCnst0nmmX3AH9O7U/jWwbZuxNKq1vh9seY1o4vJMAkghZQEcuiLNRNTHVx4Y5iG TlxvqhmT+IuE/XZtst2vdNq5CsvOkEYjEH7x+ZGIJVrFI4Ty/mtYVv7CX9xEvt+ksquoMt ArH/ruR5Diz7CcLK70/B2eIKg3Q8nB4= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-30-4BAQyUcGPhy24kJMwOxdew-1; Tue, 28 Sep 2021 23:15:22 -0400 X-MC-Unique: 4BAQyUcGPhy24kJMwOxdew-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 4EEBE1084687; Wed, 29 Sep 2021 03:15:20 +0000 (UTC) Received: from piliu.users.ipa.redhat.com (ovpn-8-24.pek2.redhat.com [10.72.8.24]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 45EE060583; Wed, 29 Sep 2021 03:15:13 +0000 (UTC) Date: Wed, 29 Sep 2021 11:15:09 +0800 From: Pingfan Liu To: Mark Rutland Cc: Pingfan Liu , linux-kernel@vger.kernel.org, Thomas Gleixner , Catalin Marinas , Will Deacon , Marc Zyngier , Joey Gouly , Sami Tolvanen , Julien Thierry , Yuichi Ito , linux-arm-kernel@lists.infradead.org Subject: Re: [PATCHv2 3/5] kernel/irq: make irq_{enter,exit}() in handle_domain_irq() arch optional Message-ID: References: <20210924132837.45994-1-kernelfans@gmail.com> <20210924132837.45994-4-kernelfans@gmail.com> <20210928085500.GC1924@C02TD0UTHF1T.local> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210928085500.GC1924@C02TD0UTHF1T.local> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Sep 28, 2021 at 09:55:00AM +0100, Mark Rutland wrote: > On Fri, Sep 24, 2021 at 09:28:35PM +0800, Pingfan Liu wrote: > > handle_domain_irq() contains two major parts: > > -1. irq_enter()/irq_exit(), which serves as hooks for rcu and trace etc. > > -2. irq mapping and dispatching > > > > After the introduction of irqentry_enter()/irqentry_exit() and arch > > specific counterpart (e.g. arm64), roughly speaking, rcu_irq_enter() has > > already been called. Hence here comes requirement to move > > irq_enter/irq_exit out of handle_domain_irq(). And arches should handle > > about irq_enter_rcu()/irq_exit_rcu() by themself. > > > > Since there is still arches, which does not adopt irqentry_enter(), let > > irq_enter()/irq_exit() arch optional in handle_domain_irq(). > > The patch below looks good to me, but the commit message is a little > hard to follow. How about: > > 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. > > For architectures which do not select the symbol. there should be no > functional change as a result of this patch. > Thanks for your precious time to improve the log. It looks great, and I will use it in V2. I will keep learning to improve my level of log. > With that commit message: > > Reviewed-by: Mark Rutland > Thanks, Pingfan 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 AB93EC433FE for ; Wed, 29 Sep 2021 03:17:32 +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 79B2161352 for ; Wed, 29 Sep 2021 03:17:32 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 79B2161352 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com 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:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=QcHLOIR9sd7v8fZ0OE4aptI1MtvNlS4ySB1d/rX7ymE=; b=d3CWtrbS51Da8H mVTrhjELgQ/kCi4IA/e+1UvuxvzQe+BSOj3SZSdfSD2EOKyGxZoMmTJbseXrtA+hu3Mfi0RX0W6i7 V2YoPCJ2gs3d7rBbTqrtqi478byILF2pWbzIrgc6CSBMefD6tObXWXZPXJr3A9z15IDgTIoXPWhlz zbQUcuQCwbBeLHwN+p3RYywccH4wzaWHpoAXSrGu4YnUdQVM+f4/3HoQMWM0xlY0w4BVJaFfE52ty d0lQR1O9MxKn3uKIydm/69mFsBMilHOx4+UXdT4e+vbNhxfW4fWdT1wXOCkzybKDcRhZjb+yPotL2 qA1iyTZ3/ylLaswS7E+Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mVQ4A-009kWn-J0; Wed, 29 Sep 2021 03:15:30 +0000 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mVQ47-009kWI-7P for linux-arm-kernel@lists.infradead.org; Wed, 29 Sep 2021 03:15:28 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1632885325; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=VYUwZTajBKG73N6boXA2eLFqYW6+o4P9ejOOh0bWbFg=; b=ET73G2qCnst0nmmX3AH9O7U/jWwbZuxNKq1vh9seY1o4vJMAkghZQEcuiLNRNTHVx4Y5iG TlxvqhmT+IuE/XZtst2vdNq5CsvOkEYjEH7x+ZGIJVrFI4Ty/mtYVv7CX9xEvt+ksquoMt ArH/ruR5Diz7CcLK70/B2eIKg3Q8nB4= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-30-4BAQyUcGPhy24kJMwOxdew-1; Tue, 28 Sep 2021 23:15:22 -0400 X-MC-Unique: 4BAQyUcGPhy24kJMwOxdew-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 4EEBE1084687; Wed, 29 Sep 2021 03:15:20 +0000 (UTC) Received: from piliu.users.ipa.redhat.com (ovpn-8-24.pek2.redhat.com [10.72.8.24]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 45EE060583; Wed, 29 Sep 2021 03:15:13 +0000 (UTC) Date: Wed, 29 Sep 2021 11:15:09 +0800 From: Pingfan Liu To: Mark Rutland Cc: Pingfan Liu , linux-kernel@vger.kernel.org, Thomas Gleixner , Catalin Marinas , Will Deacon , Marc Zyngier , Joey Gouly , Sami Tolvanen , Julien Thierry , Yuichi Ito , linux-arm-kernel@lists.infradead.org Subject: Re: [PATCHv2 3/5] kernel/irq: make irq_{enter,exit}() in handle_domain_irq() arch optional Message-ID: References: <20210924132837.45994-1-kernelfans@gmail.com> <20210924132837.45994-4-kernelfans@gmail.com> <20210928085500.GC1924@C02TD0UTHF1T.local> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20210928085500.GC1924@C02TD0UTHF1T.local> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210928_201527_364471_EA8F54E3 X-CRM114-Status: GOOD ( 30.19 ) 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 Tue, Sep 28, 2021 at 09:55:00AM +0100, Mark Rutland wrote: > On Fri, Sep 24, 2021 at 09:28:35PM +0800, Pingfan Liu wrote: > > handle_domain_irq() contains two major parts: > > -1. irq_enter()/irq_exit(), which serves as hooks for rcu and trace etc. > > -2. irq mapping and dispatching > > > > After the introduction of irqentry_enter()/irqentry_exit() and arch > > specific counterpart (e.g. arm64), roughly speaking, rcu_irq_enter() has > > already been called. Hence here comes requirement to move > > irq_enter/irq_exit out of handle_domain_irq(). And arches should handle > > about irq_enter_rcu()/irq_exit_rcu() by themself. > > > > Since there is still arches, which does not adopt irqentry_enter(), let > > irq_enter()/irq_exit() arch optional in handle_domain_irq(). > > The patch below looks good to me, but the commit message is a little > hard to follow. How about: > > 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. > > For architectures which do not select the symbol. there should be no > functional change as a result of this patch. > Thanks for your precious time to improve the log. It looks great, and I will use it in V2. I will keep learning to improve my level of log. > With that commit message: > > Reviewed-by: Mark Rutland > Thanks, Pingfan _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel