Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp159295pxb; Thu, 21 Apr 2022 20:06:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyOGgOqOUHwW9FAKRLaqQu8jwuotej1XiZdv+Rs1Y6dDAtNscXBUfExEagTxjwCgLQE16mO X-Received: by 2002:a17:907:1c8f:b0:6e8:f898:63bb with SMTP id nb15-20020a1709071c8f00b006e8f89863bbmr2227085ejc.721.1650596808118; Thu, 21 Apr 2022 20:06:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650596808; cv=none; d=google.com; s=arc-20160816; b=W8zynoEASz4N3tkcoM0VSD14FacU0s4PDRvLRpBCpW+6qpQBVD7n7jL59z5N+EvXk/ sahuIiQgeh/RAM2RbOE/BfSklWfSPmSWE7e7sUueoueezOpDB5HOouL/5W8+An2ahm43 eKL7+Nquvf8//nfcDSyQ0zyd9mllvikjSJlI90UAfo3y5g31W1IQ8vJ5Hpr1xZ7h+cV+ SQ51WBirATqEyvtT+0E88g4Y0AKIUr1u4cO4SUN1pyehpZI2EGNwwjzAKo1ocQW2QEB3 7V9O/Dbk/IckuOdvtJUAqEiI0OQF4TvCSy9FPxxp3WJhcEiP9AjSE44Cp7aZjomTFFja T+iw== 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=uzYXo/VcJvRjs2HffM8nTNZVi+miyQYyPlSA2OZKyvQ=; b=h38Wz2fucpiLSIAdrYRuF+bHWihc7DiRozll9XGGT6kwSxU4jWXEJJj/ahs92j3vrl a6aq1/WJDNgGr5sJdl8nzy1/bv5CuU19ZRn67huhAyelvy6SmfYfeyOX19V6ZLT1I0kF 3Yc0V2553zfQ69LZLvZ6WUu51aDFLTV2gHoC6Jrak6DY4FV9PH+GvMlaeTLoB/7es1SZ xRRjjaYOeXdLEdarR0j4x+hsMc/yHn0RuCCr1Z5UjPsVnxuIq03jDiejUm+yQcct4WaS KrQ5/XFi/iZMbhJWgWVH+KtAbBS+WoEctAw8FDczCWOHcvHkTnNdk5ldzJRGT0+wUm2W jn1Q== 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 v13-20020a1709061dcd00b006efc916692esi5206210ejh.907.2022.04.21.20.06.24; Thu, 21 Apr 2022 20:06:48 -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 S1386398AbiDUMxo (ORCPT + 99 others); Thu, 21 Apr 2022 08:53:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50914 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1386366AbiDUMxn (ORCPT ); Thu, 21 Apr 2022 08:53:43 -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 A29E132993; Thu, 21 Apr 2022 05:50:53 -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 C79F2B82293; Thu, 21 Apr 2022 12:50:51 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5CCE6C385A1; Thu, 21 Apr 2022 12:50:49 +0000 (UTC) Date: Thu, 21 Apr 2022 08:50:47 -0400 From: Steven Rostedt To: patrick wang Cc: paulmck@kernel.org, frederic@kernel.org, quic_neeraju@quicinc.com, josh@joshtriplett.org, mathieu.desnoyers@efficios.com, jiangshanlai@gmail.com, joel@joelfernandes.org, rcu@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] rcu: ftrace: avoid tracing a few functions executed in multi_cpu_stop() Message-ID: <20220421085047.2cb8edf9@gandalf.local.home> In-Reply-To: References: <20220418043735.11441-1-patrick.wang.shcn@gmail.com> <20220418143404.55c8fcab@gandalf.local.home> <20220420114454.69ab108c@gandalf.local.home> <20220420122633.55d4ff6b@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 Thu, 21 Apr 2022 19:36:06 +0800 patrick wang wrote: > On Thu, Apr 21, 2022 at 12:26 AM Steven Rostedt wrote: > > > > On Wed, 20 Apr 2022 11:44:54 -0400 > > Steven Rostedt wrote: > > > > > > Interesting. On x86 when we used stop machine[*] it was not an issue to > > modify the code that is being executed in stop machine. I'm curious to > > exactly what the issue is if something does get traced in the stop machine > > processing. Why does it crash? > > I looked up the commit history. When x86 turned to breakpoints, stop > machine's state machine loop had no calls during waiting. So there > was no function being called during modifying code. Which means > there were no other cpus would load those instructions to be updated > in this period. While the stop machine currently will call other functions > and the call chain is fairly deep. So it may not quite be suitable for ftrace > now because it can not make sure the instructions within its own call > chain are updated atomically. Are you saying that the RISC-V stop machine implementation has code being called on the other CPUs while they wait? -- Steve