Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp2955122pxm; Mon, 28 Feb 2022 09:11:07 -0800 (PST) X-Google-Smtp-Source: ABdhPJz/YqTfXu9iMrG5aDn6ToBmGGIyafIqtVL6BOFSe3XfBDVV1UNJ3tLXt5vy64nKB1BZGWa/ X-Received: by 2002:a63:6381:0:b0:36e:4ae4:a178 with SMTP id x123-20020a636381000000b0036e4ae4a178mr18164698pgb.193.1646068266887; Mon, 28 Feb 2022 09:11:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646068266; cv=none; d=google.com; s=arc-20160816; b=O5qEPjZWZUkuaTIKilkRl0Rsbv+3gch98KetKLXWH1LyX3V11CVmFMsFiiFVUaCQ4O kab1G7T3zZ1DyP7/SNa2VwTVW7UsAh8NCATl66sUM2YbWZqsQUFzMTttyp+HWbHs+3dD 9irBYvbk9C3lPO29cufVJpDxrqeC1+MqiWwvORGc+JkPVtqX2fz8Pe1q4YBT+HXx22xl EEEtKu3tQu3grVVxBZ7Zo/Dr1Za+7CpFVBnHzaSpxiY7TrF+R5bXM+7UYIzr+OENxyqP vYH2ReqglS379LlTBYdD389LKuxilyyqRH2yWwqW1i7fMMPZz2b3N+XxnuhBtJPLzDDk afYg== 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=T5MKtPgZ5TkRbjM1Z7W4cDt7vopbrMixckOJ41ksEao=; b=tfzzSyM41JAsWb8JWBU3CW3ZGshJ3J0RvxaTEaA9vcMSAVxgyAAfUnS7UqEUk+LAiG sCL6OrWX2K9Ci0PCwcFPZXeFEosSJXy+SwIAEe15Cv4cdodDX2lRgwVjqDgsE6mPWnHL 55+AoEFtKSkCRCTOLVgOAaXBLtcKVPoTDL39xlxlAoMtHkutdqkb3XpLIEIVw9zNvpfz D4D6zi7pS3ZljgMWOkrFtdaPFS12XJJKcQdBWH6TuDeyT162AtTCaV7a6utAL8Y5CuCC 9eq96ZOsyiB+yqqvCTXsMSrQZ1m3TyQxh6syPXXWkrxlB+RPBhHHI4bdj1ogDYyLw6ss +KOw== 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 128-20020a630886000000b003652e4b3ef2si9790507pgi.265.2022.02.28.09.10.51; Mon, 28 Feb 2022 09:11:06 -0800 (PST) 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 S237469AbiB1PqH (ORCPT + 99 others); Mon, 28 Feb 2022 10:46:07 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36164 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234135AbiB1PqH (ORCPT ); Mon, 28 Feb 2022 10:46:07 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3E02879C79 for ; Mon, 28 Feb 2022 07:45:28 -0800 (PST) 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 E6A1AB811C2 for ; Mon, 28 Feb 2022 15:45:26 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D2A3EC340F0; Mon, 28 Feb 2022 15:45:24 +0000 (UTC) Date: Mon, 28 Feb 2022 10:45:23 -0500 From: Steven Rostedt To: Nicolas Saenz Julienne Cc: bristot@kernel.org, paulmck@kernel.org, mingo@redhat.com, linux-kernel@vger.kernel.org, mtosatti@redhat.com Subject: Re: [PATCH] tracing/osnoise: Force quiescent states while tracing Message-ID: <20220228104523.01eda61a@gandalf.local.home> In-Reply-To: <20220228141423.259691-1-nsaenzju@redhat.com> References: <20220228141423.259691-1-nsaenzju@redhat.com> 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 Mon, 28 Feb 2022 15:14:23 +0100 Nicolas Saenz Julienne wrote: > @@ -1386,6 +1389,22 @@ static int run_osnoise(void) > osnoise_stop_tracing(); > } > > + /* > + * Check if we're the only ones running on this nohz_full CPU > + * and that we're on a PREEMPT_RCU setup. If so, let's fake a > + * QS since there is no way for RCU to know we're not making > + * use of it. > + * > + * Otherwise it'll be done through cond_resched(). > + */ > + if (IS_ENABLED(CONFIG_PREEMPT_RCU) && > + !housekeeping_cpu(raw_smp_processor_id(), HK_FLAG_MISC) && > + tick_nohz_tick_stopped()) { > + local_irq_save(flags); > + rcu_momentary_dyntick_idle(); > + local_irq_restore(flags); > + } > + This looks very specific and a corner case. Something that depends on how RCU works. This really should be in the RCU code such that if something changes, RCU maintainers are aware of this and can update this too. I wonder if this is similar to what we have in trace_benchmark(). Would using: cond_resched_tasks_rcu_qs() work for you? -- Steve > /*