Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp77939rwi; Wed, 19 Oct 2022 17:42:04 -0700 (PDT) X-Google-Smtp-Source: AMsMyM463SLOFWD3fu+XWp5RBzbrNXGJoDyWFjMpHg58r0nSvwhWfJ4fWN3Q8X4KD5qdHJIrQXSD X-Received: by 2002:a17:90b:4a4a:b0:20a:f75c:de5 with SMTP id lb10-20020a17090b4a4a00b0020af75c0de5mr13289698pjb.152.1666226524660; Wed, 19 Oct 2022 17:42:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666226524; cv=none; d=google.com; s=arc-20160816; b=nbMpKUCZPwRf7w+FJcvrGcCreKjCAPIMZ0CuP9k/z7nK+HIpNhI7ogJGE/x7DN6eEa B6MhugLlRmcQ7SsfSyYeCmOBn4SXY0bmPCzoDBFDr9vXsKZKqG3yt2GT4W/XrzriHOE5 bFpes9UmcTCE3LvcOaBJsN+YfANTcyyRz5Ld/Hk+V5GBCCNJfsQiT3CQAy4QBM3qnFnm f3pW54pa1jj654OtpgG6bQEsVkNvBZRGw7kOFs1eaJdSM7vM4fTNr111GF+4EM7HL/6f C7skin5m6ytL6cFBBWXqe4x8MTU2WxL+VcLHSI6KHCI0ZL6/6mzwk/CgN+wd2KGIzGcR 0m4A== 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=3zqxU45fUxMygxfjnHEWVc37/uG5mFx10seacB2hYWM=; b=xg7WIkzGLGR+nf5yLoS528WGRCVFVaWm8ooON2CYUTUYzDSQt5/qMgYeYgeNPsyw3P 68bj/QWzGgKGVfNpX/BH5OXZNzacUT+dU0lBL5KIWNKd+HdPLLLqtXOriPkpS6HIQRH1 iNOX9extoxeLP/HauxzDpl2c8wa0PCJXwWtWTlC3bKDmQ1tlr4jKx//EHT/wuB4ZXuBW T+DXSJKHoNwiFNfIljqUMViLWMn0RcgYV84DX1sLKx+Dwu2kR2TCA00Gz98GnpDBo/2F p7Aek06DjTznmO1l2lR3F8dq+jO4OwEVp00jxEI2rTyWx2D3oO+1tecljjx19ZDY5tZr oX/A== 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 b14-20020a170902b60e00b00176a2d5ae14si18867524pls.363.2022.10.19.17.41.51; Wed, 19 Oct 2022 17:42:04 -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 S229935AbiJTAHv (ORCPT + 99 others); Wed, 19 Oct 2022 20:07:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44456 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229675AbiJTAHs (ORCPT ); Wed, 19 Oct 2022 20:07:48 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6CB011946E5; Wed, 19 Oct 2022 17:07:45 -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 ams.source.kernel.org (Postfix) with ESMTPS id 2D806B82626; Thu, 20 Oct 2022 00:07:44 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 21371C433C1; Thu, 20 Oct 2022 00:07:42 +0000 (UTC) Date: Wed, 19 Oct 2022 20:07:45 -0400 From: Steven Rostedt To: LKML Cc: Linux Trace Kernel , Masami Hiramatsu , Andrew Morton , Mathieu Desnoyers , "Paul E. McKenney" , Joel Fernandes , Tom Zanussi Subject: Re: [PATCH] tracing: Add trace_trigger kernel command line option Message-ID: <20221019200745.0152fc51@gandalf.local.home> In-Reply-To: <20221019200137.70343645@gandalf.local.home> References: <20221019200137.70343645@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 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 Wed, 19 Oct 2022 20:01:37 -0400 Steven Rostedt wrote: > @@ -90,6 +90,10 @@ int unregister_tracepoint_module_notifier(struct notifier_block *nb) > #ifdef CONFIG_TRACEPOINTS > static inline void tracepoint_synchronize_unregister(void) > { > + /* Early updates do not need synchronization */ > + if (early_boot_irqs_disabled) > + return; > + > synchronize_srcu(&tracepoint_srcu); > synchronize_rcu(); I wonder if this check should be just moved to the RCU synchronization code? That is, if early_boot_irqs_disabled is set, do nothing, as there should be nothing to synchronize against. It took me a bit to figure out why I was constantly getting: [ 1.072013] rcu: srcu_init: Setting srcu_struct sizes based on contention. [ 1.078888] ------------[ cut here ]------------ [ 1.083422] Interrupts were enabled early [ 1.087399] WARNING: CPU: 0 PID: 0 at init/main.c:1061 start_kernel+0x36f/0x4e8 [ 1.094656] Modules linked in: [ 1.097683] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 6.1.0-rc1-test+ #461 [ 1.104509] Hardware name: Hewlett-Packard HP Compaq Pro 6300 SFF/339A, BIOS K01 v03.03 07/14/2016 [ 1.113411] RIP: 0010:start_kernel+0x36f/0x4e8 [ 1.117817] Code: 48 27 5f e8 fd 7b 03 00 e8 55 72 e5 fe e8 6b 05 03 00 ff 15 2a f9 89 ff 0f ba e0 09 73 0e 48 c7 c7 98 26 31 a0 e8 01 5b df fe <0f> 0b c6 05 c7 2c af ff 00 e8 da 36 47 fe ff 15 14 f9 89 ff e8 56 [ 1.136485] RSP: 0000:ffffffffa0603f30 EFLAGS: 00010286 [ 1.141670] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000 [ 1.148754] RDX: 0000000000000002 RSI: 00000000ffffdfff RDI: 0000000000000001 [ 1.155840] RBP: 0000000000000000 R08: 0000000000000000 R09: ffffffffa0603dd8 [ 1.162926] R10: 0000000000000003 R11: ffffffffa0734168 R12: 000000000000180a [ 1.170011] R13: 00000000010fecf0 R14: 0000000000000000 R15: 00000000d44e3018 [ 1.177097] FS: 0000000000000000(0000) GS:ffff91909aa00000(0000) knlGS:0000000000000000 [ 1.185131] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 1.190835] CR2: ffff91909edff000 CR3: 000000007760a001 CR4: 00000000000606f0 [ 1.197924] Call Trace: [ 1.200345] It was a bit of whack-a-mole in finding all the places that were calling synchronize RCU. -- Steve