Received: by 2002:a25:5b86:0:0:0:0:0 with SMTP id p128csp1621569ybb; Fri, 29 Mar 2019 08:05:09 -0700 (PDT) X-Google-Smtp-Source: APXvYqwT8cZrA8ntN1ln4vgHWFrxBAs4aulR+F5DAqaWhbKASxki0c0zixFIEQ75jnmkVnKBC47o X-Received: by 2002:a65:65c4:: with SMTP id y4mr45983838pgv.305.1553871909353; Fri, 29 Mar 2019 08:05:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553871909; cv=none; d=google.com; s=arc-20160816; b=N9pPluFIQHiHDbPL2WkTLvy+y9KoElds4qKvl4eWAgtxPPbVt8yK6wwEqoN13xpeel ygLzYxSdwkQ4lrgwn3uoueZ/+qQPOI5TH2955rOLwBtLNciHm3fJ+HRey+wFJHuCsf4v NIP8KwXIOOaZGrS4fYvI9oObvpyi9oGSRCLW6eG69iWbc/XhHKLj3k4mqVFb6MtWlwDF TkuSvTCDxKMkQA5OanQlXn8ZhowGnXxwzANEHtV6Io69XgBgf4+KBGLO0bbrQ+A4+5mH YJXXjp1doo2RVyVhQLpgA2tcyJQCajA+vynqFRvh2XZxmzQ/hi5U82wmcO1KWP6y8Jef psNQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=Zq1ZKdFLPEVPwv4/5oUK4MqZ/duLLRWJzpI1qREt6Y0=; b=kL/KLWPYDPeZNCmdSluHdZHQsb7hvoMY3Mg5LW0K1EyObw0wLtRYNnfWmfaghfrIrw 71qbkWX6MX75sfFS12XqVH5tOBhDQJiqlY3lEF1q8zWPacW3D/F8N8HB/hgZRO6UroFf 2rK/yZShePjpVJOaN8yYWf00Kp5oAe8whqlW5QesT9PBa6msNAlemYSszAeewX2UXyl/ 7WILeAfslb4VlgkTo+NLeYwJDB+2Ii0T9tRiyzackhY61HU7sHoIt1AbNGzmP+VfZUVY AlIItQtzRtcSlg6sJoCBbgLKKNlbm299WSGoxAcuxs9PWmcwvnKg3SKLBlYFsPqc2Zrz 2xhA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m1si1159688pgh.8.2019.03.29.08.04.53; Fri, 29 Mar 2019 08:05:09 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729197AbfC2PEK (ORCPT + 99 others); Fri, 29 Mar 2019 11:04:10 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:5206 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728720AbfC2PEK (ORCPT ); Fri, 29 Mar 2019 11:04:10 -0400 Received: from DGGEMS413-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id E214EDB6B05F9EE6F112; Fri, 29 Mar 2019 23:04:07 +0800 (CST) Received: from [127.0.0.1] (10.184.12.158) by DGGEMS413-HUB.china.huawei.com (10.3.19.213) with Microsoft SMTP Server id 14.3.408.0; Fri, 29 Mar 2019 23:04:01 +0800 Subject: Re: [RFC PATCH] irqchip/gic-v3: Make gic_handle_irq() notrace To: Marc Zyngier , , CC: , , , , , , , , , References: <1553865808-30604-1-git-send-email-yuzenghui@huawei.com> <237b00d0-8a8d-ede6-91b1-c3e23e61925c@arm.com> From: Zenghui Yu Message-ID: Date: Fri, 29 Mar 2019 23:02:05 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:64.0) Gecko/20100101 Thunderbird/64.0 MIME-Version: 1.0 In-Reply-To: <237b00d0-8a8d-ede6-91b1-c3e23e61925c@arm.com> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.184.12.158] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Marc, On 2019/3/29 21:58, Marc Zyngier wrote: > Hi Zenghui, > > On 29/03/2019 13:23, Zenghui Yu wrote: >> Enable pseudo NMI together with function_graph tracer, will lead >> the system to a hang. This is easy to reproduce, >> >> 1) Set "irqchip.gicv3_pseudo_nmi=1" on the kernel command line >> 2) echo function_graph > /sys/kernel/debug/tracing/current_tracer >> >> This patch (RFC) set gic_handle_irq() as notrace and it seems works >> fine now. But I have no idea about what the issue is exactly, and >> you can regard this patch as a report then :) >> >> Can someone give a look at it and provide some explanations ? >> >> Thanks! >> >> Cc: Julien Thierry >> Cc: Steven Rostedt >> Signed-off-by: Zenghui Yu >> --- >> drivers/irqchip/irq-gic-v3.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/drivers/irqchip/irq-gic-v3.c b/drivers/irqchip/irq-gic-v3.c >> index 15e55d3..8d0c25f 100644 >> --- a/drivers/irqchip/irq-gic-v3.c >> +++ b/drivers/irqchip/irq-gic-v3.c >> @@ -487,7 +487,7 @@ static inline void gic_handle_nmi(u32 irqnr, struct pt_regs *regs) >> gic_deactivate_unhandled(irqnr); >> } >> >> -static asmlinkage void __exception_irq_entry gic_handle_irq(struct pt_regs *regs) >> +static asmlinkage notrace void __exception_irq_entry gic_handle_irq(struct pt_regs *regs) >> { >> u32 irqnr; >> >> > > > That's interesting. Do you have any out of tree patch that actually > makes use of the pseudo-NMI feature? Without those patches, the > behaviour should stay unchanged. I am at commit 1a9df9e29c2afecf6e3089442d429b377279ca3c. No more patches, and this is the most confusing. Just out of curiosity, I wanted to run Julien's "Use NMI for perf interrupt" patch (posted on the mailing list), so I have to enable NMI first. That said, with 1) Select Kernel Feature -> Support for NMI-like interrupts 2) Set "irqchip.gicv3_pseudo_nmi=1" on the kernel command line 3) No pseudo-NMIs have been generated at all and this issue was hit. thanks, zenghui > > On the other hand, if you can generate pseudo-NMIs, you could end-up > tracing gic_handle_irq whilst being inside the tracing code with > interrupts being notionally disabled (and that could be pretty bad). > > So, patches or no patches? > > Thanks, > > M. >