Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp3838716rwb; Tue, 16 Aug 2022 09:33:09 -0700 (PDT) X-Google-Smtp-Source: AA6agR5jlKx1I6/5mqey9ZUyynbiGTi0hoclKzcSZL3rsS7KC0iMr1rIpo1xPhhqs9BADkKL5s3T X-Received: by 2002:a63:352:0:b0:41d:fe51:7f29 with SMTP id 79-20020a630352000000b0041dfe517f29mr18289195pgd.490.1660667589512; Tue, 16 Aug 2022 09:33:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660667589; cv=none; d=google.com; s=arc-20160816; b=Ojy+A2QkG6/3L++3I+XU9uTUKuXFa40RRGVZuHIUPUz/vxd5pzXREmYvA0oN8ugsiu V+9nhwUNAziCzcCVpnyG8yaGXFvgKq0S6VTtfZSlPol4UTXQAVnZ43WAgeQKTjyU+3vz tm447LEPVKSBz/uSySZe0Rnox8sO52EUqtP3iyB9/ss7qDra5mOaVdtDueO6Wj7JFIOX 3+vNNFvD92RUtf3n7O9eg7pf9LsnNDy5HgCb7k6ejzFiNnymoWPsVqxGosVehvKTQuAF hyqwzmxjfjbA2XV6KROY+nX6pgzg/h7oWSqVqF5TJFQ7hFbm5VROAnM4DFcrbhl84InF kfow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=pXG9zp1qO/JBGnW7wuZsTCH9dcvhYtcbp9vfI18Gt+M=; b=U9AAD8PJ4K1KiUA9EL0sLrrrPnrs1HH6sYzbvFnnWqAXzz8KyKl+K8StyLtDxVPFKS 4TzBFJXc0ZD634PsSUYIwlO3mLc5EiDFHW/OSunpacdibZRZOZYjwfDe/wXSZ8sg48v7 ZfzGEf7xhgGDx0bhXcbtJYmRZWF/OWOYEkSYZU3ZX1y3vugaf15K+gMgf4J3lPzLJDcM kY28o4zkkpeG+ursZiW2LzZXd+KdH8dbSO/L+EAcB4aHhXEiESz2P7P1GQioK32EAI27 Pb29Ydk66X/Vj0yccQTufyEAFhctNAZebF+9WpMghMYW1SghrZEedoqQV54pyZget2bW nTaQ== ARC-Authentication-Results: i=1; mx.google.com; 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 i8-20020a6561a8000000b0041d109766a7si1136245pgv.529.2022.08.16.09.32.41; Tue, 16 Aug 2022 09:33:09 -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; 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 S233597AbiHPPzs (ORCPT + 99 others); Tue, 16 Aug 2022 11:55:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52158 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236315AbiHPPzX (ORCPT ); Tue, 16 Aug 2022 11:55:23 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2CB7353D12; Tue, 16 Aug 2022 08:52:48 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 95E4B61219; Tue, 16 Aug 2022 15:52:47 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C43ABC433C1; Tue, 16 Aug 2022 15:52:41 +0000 (UTC) Date: Tue, 16 Aug 2022 11:52:49 -0400 From: Steven Rostedt To: Alan Stern Cc: "Guilherme G. Piccoli" , 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 Subject: Re: [PATCH v2 08/13] tracing: Improve panic/die notifiers Message-ID: <20220816115249.66cf8f15@gandalf.local.home> In-Reply-To: References: <20220719195325.402745-1-gpiccoli@igalia.com> <20220719195325.402745-9-gpiccoli@igalia.com> <20220816101445.184ebb7c@gandalf.local.home> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-6.7 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_HI,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 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