Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp4058447rwb; Tue, 16 Aug 2022 13:41:34 -0700 (PDT) X-Google-Smtp-Source: AA6agR6EeT5xkZo4exTU6aNkKJn9GDuIdJ8LfEorpttBa1M3LmOk63tUZ14739Dhbm4Np0horMlb X-Received: by 2002:a17:90b:1bcf:b0:1f5:53cf:c01d with SMTP id oa15-20020a17090b1bcf00b001f553cfc01dmr354765pjb.37.1660682494299; Tue, 16 Aug 2022 13:41:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660682494; cv=none; d=google.com; s=arc-20160816; b=kSkvF4OPXnPsjIkvVN/+WUSr/NMy0htCe/N6W4KO1ArwzCE9G1IIbJaxh9oX42odo1 MTufEPdvFBhcoo0VHaehoskHA3L8fvqb0QUkdg93D/YuqdplmscNUIjsSb0kL4Qh3crr EUX3BA16KyIhTTa5f+OuV68gLnt8uhEAHZ0e1sToZ8pkNZC29fOBrnHOEvTsGaCjhiRg n2x378Smqgq3EXpCa5dJM6x4S+JpKHpTW7KWKa3aoSNaFRQkKI94uFRsJUaTSthnfb+F W9nc5vRlWGJEUMJ198/zyIxb4jBH/cfkiuZW/v8rVanx5heJ12Eg0j2Wm1wTvx4KEb4q NL8g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=cIS73AGgJyieKU1tG/xZQvCqq8exnfGqB4TcWuZRJMk=; b=ATczIPtWSvPY8QgeWmchr9ZHOrKMppDWc75lADm6X9UF56z3kdxj9M3X0A+rfGu/HU PPgH9R5QkHK1IIAGp//4QsDkzVC0VF+oJLZJE86ozl9kglKHXZj0+ixYke7F0M6ECmy1 K7imuUjpRFiPDVu6YOQOUM6jG3DGIzX4wbZQIuQD7eGenMiDc/Tq58hKswc7E5E6ZLFt hu4iUXhAiOgH6eW1H9ImgzBP2fCWG9RgHX7v8BYtSULc/7hRVyeOH450fiD3soFy51hU t+vgyim7bnZ4AeZE1UYbM9mMZBN9IPn1uyGN1mRjrpxmjbBInJw30dRZ6mvSeqSljpOk jOiw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@igalia.com header.s=20170329 header.b=FkEUF2DP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m6-20020aa79006000000b0052dc70d6fadsi32102pfo.286.2022.08.16.13.41.23; Tue, 16 Aug 2022 13:41:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=fail header.i=@igalia.com header.s=20170329 header.b=FkEUF2DP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237379AbiHPUNk (ORCPT + 99 others); Tue, 16 Aug 2022 16:13:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49282 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237217AbiHPUNi (ORCPT ); Tue, 16 Aug 2022 16:13:38 -0400 Received: from fanzine2.igalia.com (fanzine.igalia.com [178.60.130.6]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9729551A20; Tue, 16 Aug 2022 13:13:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=igalia.com; s=20170329; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:From: References:Cc:To:Subject:MIME-Version:Date:Message-ID:Sender:Reply-To: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=cIS73AGgJyieKU1tG/xZQvCqq8exnfGqB4TcWuZRJMk=; b=FkEUF2DP0ATjqek0UTg5E6KGpT SfZHe9fW2AONVfJAs/8IfzSTsTd9mdeX2lP+zLryIK+TSwQT+1+SxpL5mIvnqGUU7sIH02Ajg7mVy cq1l1k1lYSy/25TQp7wwpcyxMc/YnIrMfrkKANHUcMLPcvZWHteIFmJXOTqw+Xz+452175GKpCp65 /o2iXSY0BqlMZDZ7rp14XcPmzP2uND+NNI5OzXGp5sTt1G5pHbYuWtYW1u5NTx0LKMb3euFHrYekU 8GMjSivYRkcl6vjcbMV/VqJ5/blLDgs51BUCiyMhb+/tIiagsNphS1KpAJiMWO+NA6QVVx5/mrtdN nWdCvytQ==; Received: from [179.232.144.59] (helo=[192.168.0.5]) by fanzine2.igalia.com with esmtpsa (Cipher TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_128_GCM:128) (Exim) id 1oO2vr-00AHjX-Kj; Tue, 16 Aug 2022 22:12:59 +0200 Message-ID: <7181a47b-001c-0588-4102-1cfd8bead0ac@igalia.com> Date: Tue, 16 Aug 2022 17:12:33 -0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.12.0 Subject: Re: [PATCH v2 08/13] tracing: Improve panic/die notifiers Content-Language: en-US To: Steven Rostedt , Alan Stern Cc: akpm@linux-foundation.org, bhe@redhat.com, pmladek@suse.com, kexec@lists.infradead.org, linux-kernel@vger.kernel.org, linux-hyperv@vger.kernel.org, netdev@vger.kernel.org, x86@kernel.org, kernel-dev@igalia.com, kernel@gpiccoli.net, halves@canonical.com, fabiomirmar@gmail.com, alejandro.j.jimenez@oracle.com, andriy.shevchenko@linux.intel.com, arnd@arndb.de, bp@alien8.de, corbet@lwn.net, d.hatayama@jp.fujitsu.com, dave.hansen@linux.intel.com, dyoung@redhat.com, feng.tang@intel.com, gregkh@linuxfoundation.org, mikelley@microsoft.com, hidehiro.kawai.ez@hitachi.com, jgross@suse.com, john.ogness@linutronix.de, keescook@chromium.org, luto@kernel.org, mhiramat@kernel.org, mingo@redhat.com, paulmck@kernel.org, peterz@infradead.org, senozhatsky@chromium.org, tglx@linutronix.de, vgoyal@redhat.com, vkuznets@redhat.com, will@kernel.org, Sergei Shtylyov References: <20220719195325.402745-1-gpiccoli@igalia.com> <20220719195325.402745-9-gpiccoli@igalia.com> <20220816101445.184ebb7c@gandalf.local.home> <20220816115249.66cf8f15@gandalf.local.home> From: "Guilherme G. Piccoli" In-Reply-To: <20220816115249.66cf8f15@gandalf.local.home> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 16/08/2022 12:52, Steven Rostedt wrote: > On Tue, 16 Aug 2022 10:57:20 -0400 > Alan Stern wrote: > >>> static int trace_die_panic_handler(struct notifier_block *self, >>> unsigned long ev, void *unused) >>> { >>> if (!ftrace_dump_on_oops) >>> return NOTIFY_DONE; >>> >>> /* The die notifier requires DIE_OOPS to trigger */ >>> if (self == &trace_die_notifier && ev != DIE_OOPS) >>> return NOTIFY_DONE; >>> >>> ftrace_dump(ftrace_dump_on_oops); >>> >>> return NOTIFY_DONE; >>> } >> >> Or better yet: >> >> if (ftrace_dump_on_oops) { >> >> /* The die notifier requires DIE_OOPS to trigger */ >> if (self != &trace_die_notifier || ev == DIE_OOPS) >> ftrace_dump(ftrace_dump_on_oops); >> } >> return NOTIFY_DONE; >> > > That may be more consolidated but less easy to read and follow. This is far > from a fast path. > > As I maintain this bike-shed, I prefer the one I suggested ;-) > > -- Steve Perfect Steve and Alan, appreciate your suggestions! I'll submit V3 using your change Steve - honestly, I'm not sure why in the heck I put a goto there, yours is basically the same code, modulo the goto heheh A braino from me, for sure! Cheers, Guilherme