Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp795346pxx; Mon, 26 Oct 2020 23:57:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxXvgW4FnxndaRCawHzXO7Q2efCSj7auBPFOfrx/e7qMuWtlhZ5igjLV7GFtGoKvvigdAya X-Received: by 2002:a17:906:e103:: with SMTP id gj3mr925422ejb.442.1603781868774; Mon, 26 Oct 2020 23:57:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603781868; cv=none; d=google.com; s=arc-20160816; b=zVdkzzzMCxhoat7P1tHC0+pyGwlJ5V96URyfCGl0f1HE2F5i3nOrmdXHsot1UXRzWA KCAWkBQqUBLzjz4SbXStHfUdXGnRoNYrmg/f+6YYcgFAwZ8GWFy7e/Cv3c2Gt/4ixFfU sYvKcTLZcCkCYu0qKpkJJ28PgjQZWSbAT09cMrppxGEvw3sGlv/EH5OVhY+BXpV/4ggY D4406NeE3ODi4HGNhSFP3fqU28JszpEiO4LirHe47Kk4xMHm58u6N+CSprTti4xHAcjn VOiFvGP3gT56vJD4vpQHc2rLDduI64Fj6vrme4qmxE1QSY/QU15ZIq303J5PaCJFSFN+ rqTg== 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=Ah6NRelC554tYXx4sE58sRPzkcTK2+P1OuctGr4W3BY=; b=KEUi/l5+eS9ifWMl/CIGDq0QAZnwSVVGt0NZ6iFcmgG6s/rXl3yrWGWHT44bKdaHnF kQ4akWHOC1iSHqA+72JBoSZMFjPObSKs+mxSug5whFvfQjSc7/kxDOIY7b+//SpkqP5x 5votC4lqZ8swBv8ygXpsKmxGBiGD+JE3iQDNeEQo7Ar2RoWeM7Dyn8j/ixa/uHaOzzuD HaQmW5023mVIXD0aWkQfvbjeikSyRWxmjLGj98Q8yJfmV1wQIWQzKpMrbL4E7vQ+H4TM QdUWKalHP//MwLJwzE3KYml3QepsDxHw8SUI78W5kLTQVccT/XCQ2oqcwx2INQLY0xFc e4wA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b9si386344eja.250.2020.10.26.23.57.26; Mon, 26 Oct 2020 23:57:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389159AbgJZUpE (ORCPT + 99 others); Mon, 26 Oct 2020 16:45:04 -0400 Received: from mail.kernel.org ([198.145.29.99]:41256 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389145AbgJZUpD (ORCPT ); Mon, 26 Oct 2020 16:45:03 -0400 Received: from gandalf.local.home (cpe-66-24-58-225.stny.res.rr.com [66.24.58.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 406002070E; Mon, 26 Oct 2020 20:45:01 +0000 (UTC) Date: Mon, 26 Oct 2020 16:44:59 -0400 From: Steven Rostedt To: Mathieu Desnoyers Cc: Peter Zijlstra , Thomas Gleixner , "Joel Fernandes, Google" , Michael Jeanson , linux-kernel , Alexei Starovoitov , Yonghong Song , paulmck , Ingo Molnar , acme , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , bpf Subject: Re: [RFC PATCH 6/6] tracing: use sched-RCU instead of SRCU for rcuidle tracepoints Message-ID: <20201026164459.1d514d0a@gandalf.local.home> In-Reply-To: <73192641.37901.1603722487627.JavaMail.zimbra@efficios.com> References: <20201023195352.26269-1-mjeanson@efficios.com> <20201023195352.26269-7-mjeanson@efficios.com> <20201023211359.GC3563800@google.com> <20201026082010.GC2628@hirez.programming.kicks-ass.net> <73192641.37901.1603722487627.JavaMail.zimbra@efficios.com> X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 26 Oct 2020 10:28:07 -0400 (EDT) Mathieu Desnoyers wrote: > I agree with Peter. Removing the trace_.*_rcuidle weirdness from the tracepoint > API and fixing all callers to ensure they trace from a context where RCU is > watching would simplify instrumentation of the Linux kernel, thus making it harder > for subtle bugs to hide and be unearthed only when tracing is enabled. This is Note, the lockdep RCU checking of a tracepoint is outside of it being enabled or disable. So if a non rcuidle() tracepoint is in a location that RCU is not watching, it will complain loudly, even if you don't enable that tracepoint. > AFAIU the general approach Thomas Gleixner has been aiming for recently, and I > think it is a good thing. > > So if we consider this our target, and that the current state of things is that > we need to have RCU watching around callback invocation, then removing the > dependency on SRCU seems like an overall simplification which does not regress > feature-wise nor speed-wise compared with what we have upstream today. The next > steps would then be to audit all rcuidle tracepoints and make sure the context > where they are placed has RCU watching already, so we can remove the tracepoint Just remove the _rcuidle() from them, and lockdep will complain if they are being called without RCU watching. -- Steve > rcuidle API. That would effectively remove the calls to rcu_irq_{enter,exit}_irqson > from the tracepoint code. > > This is however beyond the scope of the proposed patch set. > > Thanks, > > Mathieu >